Description
1) Generated client stub from WSDL using wsdl2java axis2.
2) Created request object and assigned values to it.
3) Called client stub for particular operation with request object as input parameter.
4) Getting below error.
-
-
- Error
-
java.rmi.UnmarshalException: Failed to marshal error response: 'org.apache.axis2.AxisFault: org.apache.xmlbeans.XmlException: error: The content of elements must consist of well-formed character data or markup.' because exception ; nested exception is:
java.io.NotSerializableException: org.apache.axiom.soap.impl.llom.soap11.SOAP11FaultCodeImpl
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
at implementation.ServicesBean_wrenz2_EOImpl_1034_WLStub.retreiveProfile(Unknown Source)
at testclient.Search.main(SearchNM1.java:152)
Caused by: java.io.NotSerializableException: org.apache.axiom.soap.impl.llom.soap11.SOAP11FaultCodeImpl
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:618)
at weblogic.rjvm.MsgAbbrevOutputStream.sendThrowable(MsgAbbrevOutputStream.java:471)
at weblogic.rmi.internal.BasicServerRef.handleThrowable(BasicServerRef.java:789)
at weblogic.rmi.internal.BasicServerRef.postInvoke(BasicServerRef.java:728)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:537)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
After putting debug traces in client stub, I found that XML request is not getting formed correctly.
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns1:ProfileRequest xmlns:ns1="http://www.i.com/Services/">
<Request xmlns="">
<>1234</>
<>asda</>
</Request>
<IdentifierInfo xmlns="">
<>1232131</>
</IdentifierInfo>
</ns1:ProfileRequest>
</soapenv:Body>
</soapenv:Envelope>
Seems like Client stub is not generating proper request format, how can we resolved this as Client stub is auto generated file.