Tony,
If I do modify the wsdd, I will have to redeploy the service again correct? I'm not sure if I have access to do that (since its another team maintaning it)
Also, The problem that I am facing is with the de-serializing part of it. Please correct me if I am wrong, but the call.addParameter() is used for the outgoing request, which in this case seems to work since I do get a valid response, I can see the response in TCPMON.
I've seen several examples that used this method of adding parameters to the call object. I tried changing it, to use the QName as the second param and it didn't like it.
Another question, below is my response, so do I need to register a serializer for <SOAP-ENV> tag?.
I have registered deserializers for outMsg, headers, OC315SearchRequest, answer, OC315SearchView, userError and systemErrors. Can you think of anything else that I need to register. Also I think there might be an issues with the QName, can you help me figure out, which QName should I register these with.
I'm really sorry for bothering you, but I don't have too many people around me who can help :-(
HTTP/1.0 200 Ok
Content-Type: text/xml
Connection: close
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<esi:executeRequestOut xmlns:esi="urn:ExpoServiceInterface">
<outMsg>
<headers>
<requestFinishedTime></requestFinishedTime>
<requestReceivedTime>2004-02-19-14.47.18.000000</requestReceivedTime>
<sessionID></sessionID>
<processID>chq-expovatest1_9347110</processID>
<requests xsi:type="Array" arrayType="SearchRequest[1]">
<SearchRequest>
<bookingNumber></bookingNumber>
<consolNumber>HKG8154229</consolNumber>
<containerNumber></containerNumber>
<masterNumber></masterNumber>
</SearchRequest>
</requests>
<columnHeadings xsi:type="Array" arrayType="UndefinedObject[]">
</columnHeadings>
</headers>
<answer>
<isSuccessful>true</isSuccessful>
<resultsSize>3</resultsSize>
<results xsi:type="Array" arrayType="OC315SearchView[2]">
<OC315SearchView>
<containerCtlRef>C910487788</containerCtlRef>
<containerNo>APLS2939750</containerNo>
<moveType>CY/CY</moveType>
<containerSeal>2680993 </containerSeal>
<containerSize>20</containerSize>
<bookingNum>DUI031281394-2</bookingNum>
</OC315SearchView>
<OC315SearchView>
<containerCtlRef>C910487800</containerCtlRef>
<containerNo>GUTU4187106</containerNo>
<moveType>CY/CY</moveType>
<containerSeal>2681968 </containerSeal>
<containerSize>20</containerSize>
<bookingNum>DUI031281904-4</bookingNum>
</OC315SearchView>
</results>
<userErrorsSize>0</userErrorsSize>
<userErrors></userErrors>
<systemErrorsSize>0</systemErrorsSize>
<systemErrors></systemErrors>
</answer>
</outMsg>
</esi:executeRequestOut>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Thanks,
Parul
| Tony Blair <[EMAIL PROTECTED]>
02/20/2004 01:20 PM
|
To: [EMAIL PROTECTED] cc: (bcc: Parul Joshi/IS/Expeditors) Subject: Re: No serializer found for class |
Parul,
I've notice two things:
1-Your WSDD does not have any information regarding the encoding, ser and deser. Perhaps you may have to add them manually yourself. The absence of these information results in exceptions such as Seriliazer or Desr not found.
2-In the client code the call.addParameter() requires an Object of type QName according as the 2nd parameter according to the API docs, yet you are passing a XDS type.
Other than these two I don't see anything obvious that might cause the exception.
Regards,
Tony.
[EMAIL PROTECTED] wrote:
The service is implemented in SmallTalk, and basically has a single main method "executeRequest" which takes in a generic Object, and based on the type of Object it returns appropriate "View" objects.
The wsdd is below, its very different from what I've see, which is why I can't understand a lot of it :-(
I've attached a soft copy, but also cut and paste the relevant sections..
<?xml version="1.0" ?>
- <!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) -->
- <!-- Generated by VisualAge Smalltalk Web Services on 6/10/2003 at 1:08:16 PM -->
- <vastwsd:deployment targetNamespace="urn:ExpoServiceInterface"
xmlns:vast="Smalltalk" xmlns:vastwsd="urn:VASTWebServiceDeployment600"
xmlns:esi="urn:ExpoServiceInterface" xmlns:n="urn:VASTWebServiceDeployment600"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:VASTWebServiceDeployment600">
- <services>
<service name="ExpoServiceInterface" namespace="http://www.ExpoServiceInterface.com/ExpoServiceInterface">
<documentation xmlns:zmls="http://www.w3.org/2001/XMLSchema" />
<serviceInterfaceClass>SstWSService</serviceInterfaceClass>
- <provider type="SmalltalkProvider">
<vast:provider className="ExpoServiceInterface" creationMethod="current" />
- <operations>
<operation name="about" qName="esi:about" />
<operation name="status" qName="esi:status" />
<operation name="executeRequest:" qName="esi:executeRequest" />
<operation name="argsForRequestNamed:" qName="esi:argsForRequestNamed" />
</operations>
</provider>
<extensions />
</service>
</services>
This is the exectueRequest() from my client code
private Object runExecuteRequest(Object request) throws RemoteException, AxisFault, SOAPException
{
service = new Service();
call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperation(method2);
call.setOperationName(new QName("urn:ExpoServiceInterface", "executeRequest"));
setupQNames();
call.addParameter( "outMsg", XMLType.XSD_ANYTYPE, ParameterMode.IN );
call.setReturnClass(EIResponse.class);
EIResponse obj = (EIResponse) call.invoke(new Object[] {request});
return obj;
}
private void setupQNames()
{
java.lang.Class beanSF = BeanSerializerFactory.class;
java.lang.Class beanDF = BeanDeserializerFactory.class;
String nameSpace = "";//http://www.ExpoServiceInterface.com/ExpoServiceInterface-Interface";
QName qName = new javax.xml.namespace.QName("OC315SearchRequest", "OC315SearchRequest");
call.registerTypeMapping(OC315SearchRequest.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "OC315SearchRequest");
call.registerTypeMapping(OC315SearchRequest.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "OC315SearchView");
call.registerTypeMapping(OC315SearchView.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName("EIResponse", "EIResponse");
call.registerTypeMapping(EIResponse.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "outMsg");
call.registerTypeMapping(EIResponse.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "EIAbstractHeader");
call.registerTypeMapping(EIAbstractHeader.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "userErrors");
call.registerTypeMapping(UserErrorResult.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "systemErrors");
call.registerTypeMapping(SystemErrorResult.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "results");
call.registerTypeMapping(Result.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "userErrors");
call.registerTypeMapping(UserErrorResult.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "headers");
call.registerTypeMapping(EIResponseHeader.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "errorResult");
call.registerTypeMapping(ErrorResult.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "answer");
call.registerTypeMapping(Answer.class, qName, beanSF, beanDF);
qName = new javax.xml.namespace.QName(nameSpace, "systemErrors");
call.registerTypeMapping(SystemErrorResult.class, qName, beanSF, beanDF);
}
Thanks a lot for trying to help...
Parul
| Tony Blair <[EMAIL PROTECTED]>
02/20/2004 10:43 AM | To: [EMAIL PROTECTED] cc: (bcc: Parul Joshi/IS/Expeditors) Subject: Re: No serializer found for class |
Parul,
Can you post your Client code and the your WSDD (NOT the WSDL) here?
Regards,
Tony.
[EMAIL PROTECTED] wrote:
Hi there,
I am extremely new to Axis and SOAP, and am trying to solve this for the past 2 days, without and luck.
I am running into a problem when I am trying to deserialize incoming data.
I get the following exception.
SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.j
I read thru' many of the posts, and I have registered all my sub-classes with BeanSerializers and De-serializer. I still get this exception.
My return type is a complex type which has 2 other complex types in it.
I have registered outMsg, header, answer, SearchView, SearchRequest, userErrors, systemErrors. Basically I have registered all the complex types that I expect in the return object.
I am registering it like this. nameSpace is ="", since there isn't one defined in the wdss.
qName = new javax.xml.namespace.QName(nameSpace, "outMsg");
call.registerTypeMapping(EIResponse.class, qName, beanSF, beanDF);
I don't know if I'm registering it incorrect, since I'm not sure what I should put in the namespace, I tried several different things but none work.
Any Help will be greatly appreciated.
Thanks,
Parul
