Just to give my 2 cents on this

You can generate classes with no databinding (-d none option) so you
get access to your raw xml message inside the skeleton

Ajith

2008/3/7 Daniel Silva <[EMAIL PROTECTED]>:
> Hi,
>
>  I will explain what I'm doing.
>  I'm developing a web service (server side) based on a predefined standard 
> wsdl.
>  I used wsdl2java to generate server side web service skeleton.
>  I have the generated classes for types defined on schemas, the Skeleton (and 
> Skeleton interface) and MessageReceiverInOut class.
>  As I just need the received data in XML format, I will apply xsl 
> tranformation to compose the response. I don't need to parse the XML to 
> objects.
>  So, I don't want that invokeBusinessLogic method calls fromOM method and I 
> don't want an object from skeleton implementation.
>  I implemented a myToEnvelope method to compose the XML response based on the 
> received MessageContext. Having the response XML according to the defined 
> return type I put it in a SOAPEnvelope and then set and send it by 
> newMsgContext.setEnvelope(envelope).
>
>  So, my MessageReceiverInOut class is something like this:
>
>  (...)
>  public void invokeBusinessLogic(org.apache.axis2.context.MessageContext 
> msgContext, org.apache.axis2.context.MessageContext newMsgContext)
>         throws org.apache.axis2.AxisFault{
>
>
>         try {
>
>         // get the implementation class for the Web Service
>         Object obj = getTheImplementationObject(msgContext);
>
>         PIXManager_ServiceSkeletonInterface skel = 
> (PIXManager_ServiceSkeletonInterface)obj;
>         //Out Envelop
>         org.apache.axiom.soap.SOAPEnvelope envelope = null;
>         //Find the axisOperation that has been set by the Dispatch phase.
>         org.apache.axis2.description.AxisOperation op = 
> msgContext.getOperationContext().getAxisOperation();
>
>  if (op == null) {
>         throw new org.apache.axis2.AxisFault("Operation is not located, if 
> this is doclit style the SOAP-ACTION should specified via the SOAP Action to 
> use the RawXMLProvider");
>         }
>
>         java.lang.String methodName;
>         if((op.getName() != null) && ((methodName = 
> org.apache.axis2.util.JavaUtils.xmlNameToJava(op.getName().getLocalPart())) 
> != null)){
>
>
>             if("PIXManager_PRPA_IN201301UV".equals(methodName)){
>                         envelope = myToEnvelope(msgContext);
>  (...)
>  newMsgContext.setEnvelope(envelope);
>  (...)
>
>
>  I can run this successfully with a client generated with wsdl2java, but when 
> the request is made by other application the response is not sent (I'm 
> tracing this with wireshark). I can handle both requests but the response is 
> not sent in second case.
>  In this moment I'm not sure what the cause for this.
>  I attached the request messages: from our application client (that works) 
> our.xml; and otherClient.xml that fails.
>
>  Thank you in advance.
>
>  Best regards,
>  Daniel Silva
>
>
>
>
>  -----Original Message-----
>  From: Michele Mazzucco [mailto:[EMAIL PROTECTED]
>  Sent: sexta-feira, 7 de Março de 2008 16:34
>  To: [email protected]
>  Subject: Re: Axis2 Sockets
>
>  Why? If the MEP is in/out with no complications (i.e. synchronous and
>  with no redirections) you should be able to use the same socket.
>
>  Michele
>
>
>  On 7 Mar 2008, at 16:11, Thilina Gunarathne wrote:
>
>  > AFAIK it's the default behavior in case of request/response
>  > interaction
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>



-- 
Ajith Ranabahu

Reading, after a certain age, diverts the mind too much from its
creative pursuits. Any man who reads too much and uses his own brain
too little falls into lazy habits of thinking - Albert Einstein

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to