Richtige soap-adresse in WSDL File
Von: Sascha (haconer@googlemail.com) [Profil]
Datum: 30.10.2009 16:49
Message-ID: <5d227478-c6a1-4663-a46f-7ba59f00eda1@j24g2000yqa.googlegroups.com>
Newsgroup: de.comp.lang.java
Datum: 30.10.2009 16:49
Message-ID: <5d227478-c6a1-4663-a46f-7ba59f00eda1@j24g2000yqa.googlegroups.com>
Newsgroup: de.comp.lang.java
Hallo.
Ich bin gerade dabei mich in das Thema Web Services und Java mittels
Eclipse einzuarbeiten.
Dabei habe ich folgende WSDL erzeugt:
---------------------------------------------------------------------------
-------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://paket"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://
paket" xmlns:intf="http://paket" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/
wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://
paket" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="HalloWelt">
<complexType>
<sequence>
<element name="a" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="HalloWeltResponse">
<complexType>
<sequence>
<element name="HalloWeltReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="HalloWeltRequest">
<wsdl:part element="intf:HalloWelt" name="parameters"/>
</wsdl:message>
<wsdl:message name="HalloWeltResponse">
<wsdl:part element="intf:HalloWeltResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="Klasse">
<wsdl:operation name="HalloWelt">
<wsdl:input message="intf:HalloWeltRequest"
name="HalloWeltRequest"/>
<wsdl:output message="intf:HalloWeltResponse"
name="HalloWeltResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="KlasseSoapBinding" type="intf:Klasse">
<wsdlsoap:binding style="document" transport="http://
schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="HalloWelt">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="HalloWeltRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="HalloWeltResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="KlasseService">
<wsdl:port binding="intf:KlasseSoapBinding" name="Klasse">
<wsdlsoap:address location="http://localhost:8080/WSTest/
services/Klasse"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
---------------------------------------------------------------------------
-------------------------------------------------------------
Auf dem localhost, ein Websphere Application Server V6.1, habe ich die
Anwendung als EAR installiert.
In der EAR ist dementsprechend die WAR File.
Das Projekt heisst "WSTest" und in dem Paket "paket" gibt es die
Klasse "Klasse". In dieser Klasse möchte ich die Methode
"HalloWelt"
aufrufen, welche einen String übergeben bekommt (muss ein "A") sein
und bei Korrektheit des Strings dann "Hallo Welt" zurückgibt.
In dem Ordner "WebContent" ist der Ordner "wsdl" mit der
dazugehörigen
WSDL File "Klasse.wsdl".
Beim Aufruf bekomme ich folgende Fehlermeldung auf der Konsole:
---------------------------------------------------------------------------
-------------------------------------------------------------
xisFault
faultCode: {http://xml.apache.org/axis/}Server.NoService
faultSubcode:
faultString: The AXIS engine could not find a target service to
invoke! targetService is Klasse
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:HOSTNAME
The AXIS engine could not find a target service to invoke!
targetService is Klasse
at org.apache.axis.message.SOAPFaultBuilder.createFault
(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement
(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement
(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement
(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse
(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke
(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at paket.KlasseSoapBindingStub.halloWelt(KlasseSoapBindingStub.java:
106)
at paket.KlasseProxy.halloWelt(KlasseProxy.java:45)
at paket.Aufruf.Aufruf1(Aufruf.java:27)
at paket.Aufruf.main(Aufruf.java:14)
---------------------------------------------------------------------------
-------------------------------------------------------------
Kann mir jemand helfen?
Vielen Dank im Voraus.
Viele Grüße
Sascha
[ Auf dieses Posting antworten ]Antworten
- Frank Langelage (30.10.2009 19:10)
- Sascha (02.11.2009 08:43)
