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]
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid XML Studio 1.0.8.0 (http://www.liquid-technologies.com) -->
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<env:Header>
<wsa:To>http://192.168.230.1:8080/axis2/services/PIXManager_Service?wsdl</wsa:To>
<wsa:Action>urn:hl7-org:v3:PRPA_IN201301UV</wsa:Action>
<wsa:MessageID>uuid:1.2.3.4.5.10512N1</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://localhost:8080/mesa/test</wsa:Address>
</wsa:ReplyTo>
</env:Header>
<env:Body>
<PRPA_IN201301UV xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0">
<id extension="10512N1" root="1.2.3.4.5" />
<creationTime value="20080307165507" />
<versionCode code="V3PR1" />
<interactionId displayable="true" extension="PRPA_IN201301UV" root="2.16.840.1.113883" />
<processingCode code="P" />
<processingModeCode code="T" />
<acceptAckCode code="AL" />
<receiver typeCode="RCV">
<device classCode="DEV" determinerCode="INSTANCE">
<id extension="domain1" root="1.2.3.4.5.1000" />
<name>tested device </name>
</device>
</receiver>
<sender typeCode="SND">
<device classCode="DEV" determinerCode="INSTANCE">
<id extension="101" root="1.2.3.4.5" />
<name>MESA Device </name>
</device>
</sender>
<controlActProcess classCode="CACT" moodCode="EVN">
<code code="PRPA_TE201301UV" />
<subject contextConductionInd="false" typeCode="SUBJ">
<registrationEvent classCode="REG" moodCode="EVN">
<id extension="10512N1" root="1.2.3.4.5" />
<statusCode code="active" />
<subject1 typeCode="SBJ">
<patient classCode="PAT">
<id assigningAuthorityName="domain1" extension="100" root="1.2.3.4.5.1000" />
<statusCode code="active" />
<patientPerson classCode="PSN" determinerCode="INSTANCE">
<name use="L">
<given>ELLIE</given>
<family>EPSILON</family>
</name>
<telecom use="HP" value="314.555.1234" />
<telecom use="WP" value="314.555.4444" />
<administrativeGenderCode code="F" />
<birthTime value="19380224" />
<addr>
<streetAddressLine mediaType="text/plain" partType="SAL">1 PINETREE</streetAddressLine>
<city mediaType="text/plain" partType="CTY" representation="TXT">WEBSTER</city>
<state mediaType="text/plain" partType="STA">MO</state>
<postalCode mediaType="text/plain" partType="ZIP">63119</postalCode>
</addr>
</patientPerson>
<providerOrganization>
<id root="1.2.3.4.5.3000" />
<contactParty />
</providerOrganization>
</patient>
</subject1>
<custodian>
<assignedEntity>
<id root="1.5.5.5.5.5" />
</assignedEntity>
</custodian>
</registrationEvent>
</subject>
</controlActProcess>
</PRPA_IN201301UV>
</env:Body>
</env:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid XML Studio 1.0.8.0 (http://www.liquid-technologies.com) -->
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns1:PRPA_IN201301UV xmlns:ns1="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:PRPA_IN201301UV" ITSVersion="XML_1.0">
<ns1:id />
<ns1:creationTime />
<ns1:interactionId />
<ns1:processingCode />
<ns1:processingModeCode />
<ns1:acceptAckCode />
<ns1:receiver>
<ns1:telecom />
<ns1:device>
<ns1:id />
</ns1:device>
</ns1:receiver>
<ns1:sender>
<ns1:telecom />
<ns1:device>
<ns1:id />
</ns1:device>
</ns1:sender>
<ns1:controlActProcess>
<ns1:subject xsi:nil="1" />
</ns1:controlActProcess>
</ns1:PRPA_IN201301UV>
</soapenv:Body>
</soapenv:Envelope>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]