ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
1064
1064
EMPFEHLEN
-
Hallo,
Ich habe einen JAX WS 2 WebService und möchte diesen mit einem MS SOAP Client aufrufen.
Die Methode:
Wenn ich diese Method jetzt mit einem MS SOAP Makro aufrufen möchte:Code :1 2 3 4 5
@WebMethod(operationName = "hello") @WebResult(name = "the-name") public String hello(@WebParam(name = "inName") String inName) { return "Hello " + name + "!"; }
Code :1 2 3 4 5 6 7
Private Sub cmdSoap_Click() Dim soap As Object Set soap = CreateObject("MSOSOAP.SoapClient30") Call soap.mssoapinit("http://localhost:8080/services/bmi?wsdl", "MyWebServicesService") Dim strHello As String strHello = soap.hello("Das ist ein Test") End Sub
Bekomme ich im Java folgende Fehlermeldung:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
SCHWERWIEGEND: Error in decoding SOAP Message Error in decoding SOAP Message at com.sun.xml.internal.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(Unknown Source) at com.sun.xml.internal.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(Unknown Source) at com.sun.xml.internal.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(Unknown Source) at com.sun.xml.internal.ws.protocol.soap.server.SOAPMessageDispatcher.receive(Unknown Source) at com.sun.xml.internal.ws.server.Tie.handle(Unknown Source) at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.process(Unknown Source) at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExchange(Unknown Source) at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle(Unknown Source) at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source) at sun.net.httpserver.AuthFilter.doFilter(Unknown Source) at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source) at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(Unknown Source) at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source) at sun.net.httpserver.ServerImpl$Exchange.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: unexpected element name: expected=inName, actual: {http://test.service.test.com/}inName at com.sun.xml.internal.ws.encoding.jaxb.RpcLitPayloadSerializer.deserialize(Unknown Source) at com.sun.xml.internal.ws.encoding.soap.SOAPDecoder.decodeBodyContent(Unknown Source) at com.sun.xml.internal.ws.encoding.soap.SOAPDecoder.decodeBody(Unknown Source) at com.sun.xml.internal.ws.encoding.soap.SOAPDecoder.decodeEnvelope(Unknown Source) ... 17 more
Aufallend daran ist folgende Zeile:
Code :1
Caused by: unexpected element name: expected=inName, actual: {http://test.service.test.com/}inName
Es sieht so aus, als ob einer der beteiligten ein Problem mit der WSDL Datei hätte.
Diese sieht im übrigen so aus:
Weiß jemand wo der Fehler liegt? Oder was man dagegen machen kann?HTML-Code:<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://test.service.test.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://test.service.test.com/" name="MyWebServicesService"> <types/> <message name="hello"> <part name="inName" type="xsd:string"/> </message> <message name="helloResponse"> <part name="the-name" type="xsd:string"/> </message> <portType name="ChrisWebServices"> <operation name="hello" parameterOrder="inName"> <input message="tns:hello"/> <output message="tns:helloResponse"/> </operation> </portType> <binding name="ChrisWebServicesPortBinding" type="tns:ChrisWebServices"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="hello"> <soap:operation soapAction=""/> <input> <soap:body use="literal" namespace="http://test.service.test.com/"/> </input> <output> <soap:body use="literal" namespace="http://test.service.test.com/"/> </output> </operation> </binding> <service name="MyWebServicesService"> <port name="ChrisWebServicesPort" binding="tns:ChrisWebServicesPortBinding"> <soap:address location="http://localhost:8080/services/bmi"/> </port> </service> </definitions>
Danke!
Ähnliche Themen
-
JSP mit SOAP
Von Lausi0809 im Forum Enterprise Java (JEE, J2EE, Spring & Co.)Antworten: 3Letzter Beitrag: 11.03.10, 08:15 -
XML-RPC und SOAP
Von HeckMc im Forum Coders TalkAntworten: 0Letzter Beitrag: 12.06.09, 16:57 -
SOAP in PHP
Von Compane im Forum PHPAntworten: 1Letzter Beitrag: 22.02.08, 15:48 -
PHP und SOAP
Von MS47475 im Forum PHPAntworten: 1Letzter Beitrag: 27.09.07, 08:46 -
soap lib
Von CosmoKey im Forum C/C++Antworten: 2Letzter Beitrag: 11.06.04, 20:11





Zitieren
Login





