2012-03-17 21 views
0

私はjax-rpc Webサービスを持っています。私は、WebサービスにXMLを渡すしようとすると、次のエラーが発生しますxmlをjax rpc Webサービスに渡す

[3/18/12 4:26:27:947 IST] 0000002b WebServicesSe E  com.ibm.ws.webservices.engine.transport.http.WebServicesServlet doPost WSWS3227E: Error:  Exception: 
           WebServicesFault 
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException 
faultString: org.xml.sax.SAXException: WSWS3084E: Error: SimpleDeserializer  encountered a child element, which is NOT expected, in something it was trying to deserialize. Message being parsed: 
faultActor: null 
faultDetail: 

org.xml.sax.SAXException: WSWS3084E: Error: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. Message being parsed: 
at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:298) 
at com.ibm.ws.webservices.engine.SOAPPart._getSOAPEnvelope(SOAPPart.java:1090) 
at com.ibm.ws.webservices.engine.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:628) 
at com.ibm.ws.webservices.engine.SOAPPart.getEnvelope(SOAPPart.java:656) 
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandlerChain.handleRequest(JAXRPCHandlerChain.java:301) 
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler.invokeServerRequestHandler(JAXRPCHandler.java:506) 
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler$1.invoke(JAXRPCHandler.java:380) 
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:209) 
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336) 
at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:908) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) 
at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:344) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) 
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443) 
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790) 
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443) 
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175) 
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610) 
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274) 
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926) 
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557) 
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173) 
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455) 
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384) 
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272) 
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) 
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) 
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) 
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202) 
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766) 
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896) 
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527) 

同様のエラーがここに

Can a jax-ws web service use an rpc type call and receive raw xml?

に記載されているが、以前の記事で、生のXMLをオフに基づいて基づいていますWebサービスで使用されるスキーマの数。ここでは、入力に使用される特定のスキーマはありません。

WSDLファイルは次のとおりです。あなたが提供することができます任意の助けを事前に

<?xml version="1.0" encoding="UTF-8"?> 
<wsdl:definitions targetNamespace="http://service.session.plh"  xmlns:impl="http://service.session.plh" xmlns:intf="http://service.session.plh" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
<wsdl:types> 
<schema targetNamespace="http://service.session.plh" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
<element name="AddPatientResponse"> 
<complexType> 
    <sequence> 
    <element name="AddPatientReturn" nillable="true" type="xsd:string"/> 
    </sequence> 
</complexType> 
</element> 
<element name="AddPatient"> 
<complexType> 
<sequence> 
    <element name="patientform" nillable="true" type="xsd:string"/> 
</sequence> 
</complexType> 
</element> 
</schema> 
</wsdl:types> 

<wsdl:message name="AddPatientRequest"> 
<wsdl:part element="impl:AddPatient" name="parameters"> 
</wsdl:part> 

</wsdl:message> 

<wsdl:message name="AddPatientResponse"> 
<wsdl:part element="impl:AddPatientResponse" name="parameters"> 
</wsdl:part> 

</wsdl:message> 

<wsdl:portType name="StaffBean"> 
<wsdl:operation name="AddPatient"> 
    <wsdl:input message="impl:AddPatientRequest" name="AddPatientRequest"> 
</wsdl:input> 

    <wsdl:output message="impl:AddPatientResponse" name="AddPatientResponse"> 
</wsdl:output> 

</wsdl:operation> 

</wsdl:portType> 

<wsdl:binding name="StaffSoapBinding" type="impl:StaffBean"> 
<wsaw:UsingAddressing wsdl:required="false" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"/> 
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> 
<wsdl:operation name="AddPatient"> 
    <wsdlsoap:operation soapAction="AddPatient"/> 
    <wsdl:input name="AddPatientRequest"> 
    <wsdlsoap:body use="literal"/> 
    </wsdl:input> 
    <wsdl:output name="AddPatientResponse"> 
    <wsdlsoap:body use="literal"/> 
    </wsdl:output> 
</wsdl:operation> 
</wsdl:binding> 
<wsdl:service name="StaffService"> 
<wsdl:port binding="impl:StaffSoapBinding" name="Staff"> 
    <wsdlsoap:address location="http://localhost:9080/PLHospitalService/services/Staff"/> 
</wsdl:port> 
</wsdl:service> 
</wsdl:definitions> 

感謝。 Plsはできるだけ早く返信します。どんな答えにも投票します。

+0

誰かが速やかに返信してください... – nkvp

答えて

1

サービスを呼び出すSOAPリクエストを提供してください。

要求の予想されるXML構造がWSDLのXML構造と一致しません。

+0

まあ、答えに感謝します。実際には、例外としてXMLを文字列として渡そうとしました。 – nkvp

関連する問題