Re: calling external SOAP service from Ofbiz

2013-12-04 Thread jadelomeiri
Thanks a lot Jacques!

What happened is that I spent most of my time debugging and trying to solve
SOAPClientEngine. Unfortunately, I didn't get to any result.

I then tried to work on the solution with Camel. I also found a project
previously made which already integrates Ofbiz & Camel (that's the project
link:  https://github.com/bibryam/ofbiz-camel
<https://github.com/bibryam/ofbiz-camel>   )
I also had few problems with it. BTW did anyone use it before?

Which got me to finally try to use XStream. I spent some time reading
tutorials about it...

==>I will continue with XStream and my previous code tomorrow. As soon as I
have a solution, I will  be posting it.

Cheers,  


Jacques Le Roux wrote
> For the license issue, it's only in the context of redistributing with an
> incompatible license, like OFBiz with ASL2. As Adrian said we use XStream
> in OFBiz.
> 
> I believe it should be possible to go with the SOAPClientEngine class way.
> But it will never be possible to handle all cases.
> 
> As I see it, depending of the order of magnitude (number of external SOAP
> services) and their complexity, here are the solutions in increased order:
> 
> 1) Improve SOAPClientEngine if your services are not too complex
> 2) Generate Stub from WSDL using wsdl2Java and use cover OFBiz services to
> handle call to external SOAP services and possible mappings.
> 3) Use a tool like XStream or Smooks for transformations
> 4) Use an ESB or a complete solution with Camel + ServiceMix bundles (if
> necessary)
> 
> HTH
> 
> Jacques
> 
> On Wednesday, December 04, 2013 10:10 AM jadelomeiri <

> jadelomeiri@.co

> > wrote:
>> Thank you all for your help. Thank you Jacques for pointing out the
>> Smooks
>> licensing issue. As a conclusion JiBX looks like it's the best way to go?
>> 
>> BTW before I continue working on my code, I think I will try to look at
>> the
>> SOAPClientEngine.java class in Ofbiz to see if the exceptions that are
>> being
>> thrown can be fixed. Wouldn't it be a wiser way to go in finding a
>> solution?





--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/calling-external-SOAP-service-from-Ofbiz-tp4646036p4646086.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: calling external SOAP service from Ofbiz

2013-12-04 Thread Jacques Le Roux
For the license issue, it's only in the context of redistributing with an 
incompatible license, like OFBiz with ASL2. As Adrian said we use XStream in 
OFBiz.

I believe it should be possible to go with the SOAPClientEngine class way. But 
it will never be possible to handle all cases.

As I see it, depending of the order of magnitude (number of external SOAP 
services) and their complexity, here are the solutions in increased order:

1) Improve SOAPClientEngine if your services are not too complex
2) Generate Stub from WSDL using wsdl2Java and use cover OFBiz services to 
handle call to external SOAP services and possible mappings.
3) Use a tool like XStream or Smooks for transformations
4) Use an ESB or a complete solution with Camel + ServiceMix bundles (if 
necessary)

HTH

Jacques

On Wednesday, December 04, 2013 10:10 AM jadelomeiri 
 wrote:
> Thank you all for your help. Thank you Jacques for pointing out the Smooks
> licensing issue. As a conclusion JiBX looks like it's the best way to go?
> 
> BTW before I continue working on my code, I think I will try to look at the
> SOAPClientEngine.java class in Ofbiz to see if the exceptions that are being
> thrown can be fixed. Wouldn't it be a wiser way to go in finding a solution?


Re: calling external SOAP service from Ofbiz

2013-12-04 Thread jadelomeiri
Thank you all for your help. Thank you Jacques for pointing out the Smooks
licensing issue. As a conclusion JiBX looks like it's the best way to go?

BTW before I continue working on my code, I think I will try to look at the
SOAPClientEngine.java class in Ofbiz to see if the exceptions that are being
thrown can be fixed. Wouldn't it be a wiser way to go in finding a solution?



--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/calling-external-SOAP-service-from-Ofbiz-tp4646036p4646074.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: calling external SOAP service from Ofbiz

2013-12-03 Thread Jacques Le Roux
Interesting comparison for custom projects 
http://www.smooks.org/mediawiki/index.php?title=Performance

Jacques

On Wednesday, December 04, 2013 12:21 AM Adrian Crum 
 wrote:
> OFBiz uses XStream for object serialization.
> 
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
> 
> On 12/3/2013 3:49 PM, Jacques Le Roux wrote:
>> Funny, I just stumbled upon it while estimating a project today :)
>> Note that Smooks can't be embedded in OFBiz due to a license issue: 
>> http://www.smooks.org/mediawiki/index.php?title=Licensing
>> 
>> Jacques
>> 
>> On Tuesday, December 03, 2013 9:24 PM Fairuz Wan Ismail 
>>  wrote:
>>> Hi,
>>> 
>>> I use Smooks to deal with conversion xml -> Java objects when consuming a
>>> webservice. Hope it helps.
>>> 
>>> Regards,
>>> Fairuz
>>> 
>>> -Original Message-
>>> From: jadelomeiri [mailto:jadelome...@robertheath.co.uk]
>>> Sent: Wednesday, December 04, 2013 12:24 AM
>>> To: user@ofbiz.apache.org
>>> Subject: Re: calling external SOAP service from Ofbiz
>>> 
>>> Hello,
>>> 
>>> This is the solution I finally got. I hope it will be helpful for people
>>> having the same problem as I had.
>>> 
>>> 1) In my events java class I wrote the following code (which is an event
>>> calling the method that deals with SOAP):
>>> 
>>> *
>>> public static String callMySoap(HttpServletRequest
>>> request,HttpServletResponse response)
>>>   {
>>> request.setAttribute("_EVENT_MESSAGE_", "You received this SOAP
>>> response:" + MySoapClient());
>>> return "success";
>>>   }
>>> 
>>> 
>>> 
>>> public static SOAPMessage MySoapClient()
>>> {
>>> try {
>>> // Create SOAP Connection
>>> SOAPConnectionFactory soapConnectionFactory =
>>> SOAPConnectionFactory.newInstance();
>>> SOAPConnection soapConnection =
>>> soapConnectionFactory.createConnection();
>>> 
>>> // Send SOAP Message to SOAP Server
>>> String url = "http://www.webservicex.net/geoipservice.asmx";;
>>> SOAPMessage soapResponse =
>>> soapConnection.call(createSOAPRequest(), url);
>>> 
>>> soapConnection.close();
>>> return soapResponse;
>>> } catch (Exception e) {
>>> System.err.println("Error occurred while sending SOAP Request to
>>> Server");
>>> e.printStackTrace();
>>> return null;
>>> }
>>> 
>>> }
>>> 
>>> private static SOAPMessage createSOAPRequest() throws Exception {
>>> MessageFactory messageFactory = MessageFactory.newInstance();
>>> SOAPMessage soapMessage = messageFactory.createMessage();
>>> SOAPPart soapPart = soapMessage.getSOAPPart();
>>> 
>>> String serverURI = "http://www.webservicex.net/";;
>>> 
>>> // SOAP Envelope
>>> SOAPEnvelope envelope = soapPart.getEnvelope();
>>> envelope.addNamespaceDeclaration("web", serverURI);
>>> 
>>> /*
>>> Constructed SOAP Request Message:
>>> >> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
>>> xmlns:example="http://www.webservicex.net/";>
>>> 
>>> 
>>> 
>>> 192.168.1.2
>>> 
>>> 
>>> 
>>>  */
>>> 
>>> // SOAP Body
>>> SOAPBody soapBody = envelope.getBody();
>>> SOAPElement soapBodyElem = soapBody.addChildElement("GetGeoIP",
>>> "web");
>>> SOAPElement soapBodyElem1 =
>>> soapBodyElem.addChildElement("IPAddress", "web");
>>> soapBodyElem1.addTextNode("192.168.1.2");
>>> 
>>> 
>>> MimeHeaders headers = soapMessage.getMimeHeaders();
>>> headers.addHeader("SOAPAction", serverURI  + "GetGeoIP");
>>> 
>>> soapMessage.saveChanges();
>>> 
>>> /* Print the request message */
>>> System.out.print("Request SOAP Messa

Re: calling external SOAP service from Ofbiz

2013-12-03 Thread Adrian Crum

OFBiz uses XStream for object serialization.

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 12/3/2013 3:49 PM, Jacques Le Roux wrote:

Funny, I just stumbled upon it while estimating a project today :)
Note that Smooks can't be embedded in OFBiz due to a license issue: 
http://www.smooks.org/mediawiki/index.php?title=Licensing

Jacques

On Tuesday, December 03, 2013 9:24 PM Fairuz Wan Ismail 
 wrote:

Hi,

I use Smooks to deal with conversion xml -> Java objects when consuming a
webservice. Hope it helps.

Regards,
Fairuz

-Original Message-
From: jadelomeiri [mailto:jadelome...@robertheath.co.uk]
Sent: Wednesday, December 04, 2013 12:24 AM
To: user@ofbiz.apache.org
Subject: Re: calling external SOAP service from Ofbiz

Hello,

This is the solution I finally got. I hope it will be helpful for people
having the same problem as I had.

1) In my events java class I wrote the following code (which is an event
calling the method that deals with SOAP):

*
public static String callMySoap(HttpServletRequest
request,HttpServletResponse response)
  {
request.setAttribute("_EVENT_MESSAGE_", "You received this SOAP
response:" + MySoapClient());
return "success";
  }



public static SOAPMessage MySoapClient()
{
try {
// Create SOAP Connection
SOAPConnectionFactory soapConnectionFactory =
SOAPConnectionFactory.newInstance();
SOAPConnection soapConnection =
soapConnectionFactory.createConnection();

// Send SOAP Message to SOAP Server
String url = "http://www.webservicex.net/geoipservice.asmx";;
SOAPMessage soapResponse =
soapConnection.call(createSOAPRequest(), url);

soapConnection.close();
return soapResponse;
} catch (Exception e) {
System.err.println("Error occurred while sending SOAP Request to
Server");
e.printStackTrace();
return null;
}

}

private static SOAPMessage createSOAPRequest() throws Exception {
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage soapMessage = messageFactory.createMessage();
SOAPPart soapPart = soapMessage.getSOAPPart();

String serverURI = "http://www.webservicex.net/";;

// SOAP Envelope
SOAPEnvelope envelope = soapPart.getEnvelope();
envelope.addNamespaceDeclaration("web", serverURI);

/*
Constructed SOAP Request Message:
http://schemas.xmlsoap.org/soap/envelope/";
xmlns:example="http://www.webservicex.net/";>



192.168.1.2



 */

// SOAP Body
SOAPBody soapBody = envelope.getBody();
SOAPElement soapBodyElem = soapBody.addChildElement("GetGeoIP",
"web");
SOAPElement soapBodyElem1 =
soapBodyElem.addChildElement("IPAddress", "web");
soapBodyElem1.addTextNode("192.168.1.2");


MimeHeaders headers = soapMessage.getMimeHeaders();
headers.addHeader("SOAPAction", serverURI  + "GetGeoIP");

soapMessage.saveChanges();

/* Print the request message */
System.out.print("Request SOAP Message = ");
soapMessage.writeTo(System.out);
System.out.println();

return soapMessage;
}
*

2) I added the following request-map to point to my event:

*
  
  
  

*

3) I added the following view-map:

*

*

which points to the following screen widget:
*

  

  

  




  

  

*


Note:
step 3 is not necessary. I only used it to see something on my screen.


Result:
I can now see in real time the SOAP message that is being sent & the
response that is received.
and I can also this screen:
<http://ofbiz.135035.n4.nabble.com/file/n4646047/result.png>


Now:
the only thing I still need to do is some parsing on the SOAP response
message to be able to deal with the variables that interest me in that
message. I also need to enhance my code to make it more "generic" so that it
becomes somewhat dynamic and works with not only that specific Web Service
that I had to hardcode.

Do you have any suggestions for that? I do not want to be reinventing the
wheel!


Re: calling external SOAP service from Ofbiz

2013-12-03 Thread Jacques Le Roux
BTW, what are the advantages of Smooks vs wsdl2java?
Something simpler than 
https://axis.apache.org/axis/java/user-guide.html#What_Axis_can_not_send_via_SOAP
 ?

Jacques

On Tuesday, December 03, 2013 9:24 PM Fairuz Wan Ismail 
 wrote:
> Hi,
> 
> I use Smooks to deal with conversion xml -> Java objects when consuming a
> webservice. Hope it helps.
> 
> Regards,
> Fairuz
> 
> -Original Message-
> From: jadelomeiri [mailto:jadelome...@robertheath.co.uk]
> Sent: Wednesday, December 04, 2013 12:24 AM
> To: user@ofbiz.apache.org
> Subject: Re: calling external SOAP service from Ofbiz
> 
> Hello,
> 
> This is the solution I finally got. I hope it will be helpful for people
> having the same problem as I had.
> 
> 1) In my events java class I wrote the following code (which is an event
> calling the method that deals with SOAP):
> 
> *
> public static String callMySoap(HttpServletRequest
> request,HttpServletResponse response)
>  {
>request.setAttribute("_EVENT_MESSAGE_", "You received this SOAP
> response:" + MySoapClient());
>return "success";
>  }
> 
> 
> 
> public static SOAPMessage MySoapClient()
>{
>try {
>// Create SOAP Connection
>SOAPConnectionFactory soapConnectionFactory =
> SOAPConnectionFactory.newInstance();
>SOAPConnection soapConnection =
> soapConnectionFactory.createConnection();
> 
>// Send SOAP Message to SOAP Server
>String url = "http://www.webservicex.net/geoipservice.asmx";;
>SOAPMessage soapResponse =
> soapConnection.call(createSOAPRequest(), url);
> 
>soapConnection.close();
>return soapResponse;
>} catch (Exception e) {
>System.err.println("Error occurred while sending SOAP Request to
> Server");
>e.printStackTrace();
>return null;
>}
> 
>}
> 
>private static SOAPMessage createSOAPRequest() throws Exception {
>MessageFactory messageFactory = MessageFactory.newInstance();
>SOAPMessage soapMessage = messageFactory.createMessage();
>SOAPPart soapPart = soapMessage.getSOAPPart();
> 
>String serverURI = "http://www.webservicex.net/";;
> 
>// SOAP Envelope
>SOAPEnvelope envelope = soapPart.getEnvelope();
>envelope.addNamespaceDeclaration("web", serverURI);
> 
>/*
>Constructed SOAP Request Message:
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:example="http://www.webservicex.net/";>
>
>
>
>192.168.1.2
>
>
>
> */
> 
>// SOAP Body
>SOAPBody soapBody = envelope.getBody();
>SOAPElement soapBodyElem = soapBody.addChildElement("GetGeoIP",
> "web");
>SOAPElement soapBodyElem1 =
> soapBodyElem.addChildElement("IPAddress", "web");
>soapBodyElem1.addTextNode("192.168.1.2");
> 
> 
>MimeHeaders headers = soapMessage.getMimeHeaders();
>headers.addHeader("SOAPAction", serverURI  + "GetGeoIP");
> 
>soapMessage.saveChanges();
> 
>/* Print the request message */
>System.out.print("Request SOAP Message = ");
>soapMessage.writeTo(System.out);
>System.out.println();
> 
>return soapMessage;
>}
> *
> 
> 2) I added the following request-map to point to my event:
> 
> *
>  
>   invoke="callMySoap"/>
>  
>
> *
> 
> 3) I added the following view-map:
> 
> *
>  page="component://testapp/widget/TestAppScreens.xml#FeedbackMessages"/>
> *
> 
> which points to the following screen widget:
> *
>
>  
>
>   location="${parameters.mainDecoratorLocation}">
>
>  
>
>
> 
>
>  
>
>  
>
> *
> 
> 
> Note:
> step 3 is not necessary. I only used it to see something on my screen.
> 
> 
> Result:
> I can now see in real time the SOAP message that is being sent & the
> response that is received.
> and I can also this screen:
> <http://ofbiz.135035.n4.nabble.com/file/n4646047/result.png>
> 
> 
> Now:
> the only thing I still need to do is some parsing on the SOAP response
> message to be able to deal with the variables that interest me in that
> message. I also need to enhance my code to make it more "generic" so that it
> becomes somewhat dynamic and works with not only that specific Web Service
> that I had to hardcode.
> 
> Do you have any suggestions for that? I do not want to be reinventing the
> wheel!


Re: calling external SOAP service from Ofbiz

2013-12-03 Thread Jacques Le Roux
Funny, I just stumbled upon it while estimating a project today :)
Note that Smooks can't be embedded in OFBiz due to a license issue: 
http://www.smooks.org/mediawiki/index.php?title=Licensing

Jacques

On Tuesday, December 03, 2013 9:24 PM Fairuz Wan Ismail 
 wrote:
> Hi,
> 
> I use Smooks to deal with conversion xml -> Java objects when consuming a
> webservice. Hope it helps.
> 
> Regards,
> Fairuz
> 
> -Original Message-
> From: jadelomeiri [mailto:jadelome...@robertheath.co.uk]
> Sent: Wednesday, December 04, 2013 12:24 AM
> To: user@ofbiz.apache.org
> Subject: Re: calling external SOAP service from Ofbiz
> 
> Hello,
> 
> This is the solution I finally got. I hope it will be helpful for people
> having the same problem as I had.
> 
> 1) In my events java class I wrote the following code (which is an event
> calling the method that deals with SOAP):
> 
> *
> public static String callMySoap(HttpServletRequest
> request,HttpServletResponse response)
>  {
>request.setAttribute("_EVENT_MESSAGE_", "You received this SOAP
> response:" + MySoapClient());
>return "success";
>  }
> 
> 
> 
> public static SOAPMessage MySoapClient()
>{
>try {
>// Create SOAP Connection
>SOAPConnectionFactory soapConnectionFactory =
> SOAPConnectionFactory.newInstance();
>SOAPConnection soapConnection =
> soapConnectionFactory.createConnection();
> 
>// Send SOAP Message to SOAP Server
>String url = "http://www.webservicex.net/geoipservice.asmx";;
>SOAPMessage soapResponse =
> soapConnection.call(createSOAPRequest(), url);
> 
>soapConnection.close();
>return soapResponse;
>} catch (Exception e) {
>System.err.println("Error occurred while sending SOAP Request to
> Server");
>e.printStackTrace();
>return null;
>}
> 
>}
> 
>private static SOAPMessage createSOAPRequest() throws Exception {
>MessageFactory messageFactory = MessageFactory.newInstance();
>SOAPMessage soapMessage = messageFactory.createMessage();
>SOAPPart soapPart = soapMessage.getSOAPPart();
> 
>String serverURI = "http://www.webservicex.net/";;
> 
>// SOAP Envelope
>SOAPEnvelope envelope = soapPart.getEnvelope();
>envelope.addNamespaceDeclaration("web", serverURI);
> 
>/*
>Constructed SOAP Request Message:
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:example="http://www.webservicex.net/";>
>
>
>
>192.168.1.2
>
>
>
> */
> 
>// SOAP Body
>SOAPBody soapBody = envelope.getBody();
>SOAPElement soapBodyElem = soapBody.addChildElement("GetGeoIP",
> "web");
>SOAPElement soapBodyElem1 =
> soapBodyElem.addChildElement("IPAddress", "web");
>soapBodyElem1.addTextNode("192.168.1.2");
> 
> 
>MimeHeaders headers = soapMessage.getMimeHeaders();
>headers.addHeader("SOAPAction", serverURI  + "GetGeoIP");
> 
>soapMessage.saveChanges();
> 
>/* Print the request message */
>System.out.print("Request SOAP Message = ");
>soapMessage.writeTo(System.out);
>System.out.println();
> 
>return soapMessage;
>}
> *
> 
> 2) I added the following request-map to point to my event:
> 
> *
>  
>   invoke="callMySoap"/>
>  
>
> *
> 
> 3) I added the following view-map:
> 
> *
>  page="component://testapp/widget/TestAppScreens.xml#FeedbackMessages"/>
> *
> 
> which points to the following screen widget:
> *
>
>  
>
>   location="${parameters.mainDecoratorLocation}">
>
>  
>
>
> 
>
>  
>
>  
>
> *
> 
> 
> Note:
> step 3 is not necessary. I only used it to see something on my screen.
> 
> 
> Result:
> I can now see in real time the SOAP message that is being sent & the
> response that is received.
> and I can also this screen:
> <http://ofbiz.135035.n4.nabble.com/file/n4646047/result.png>
> 
> 
> Now:
> the only thing I still need to do is some parsing on the SOAP response
> message to be able to deal with the variables that interest me in that
> message. I also need to enhance my code to make it more "generic" so that it
> becomes somewhat dynamic and works with not only that specific Web Service
> that I had to hardcode.
> 
> Do you have any suggestions for that? I do not want to be reinventing the
> wheel!


RE: calling external SOAP service from Ofbiz

2013-12-03 Thread Fairuz Wan Ismail
Hi,

I use Smooks to deal with conversion xml -> Java objects when consuming a
webservice. Hope it helps.

Regards,
Fairuz

-Original Message-
From: jadelomeiri [mailto:jadelome...@robertheath.co.uk] 
Sent: Wednesday, December 04, 2013 12:24 AM
To: user@ofbiz.apache.org
Subject: Re: calling external SOAP service from Ofbiz

Hello,

This is the solution I finally got. I hope it will be helpful for people
having the same problem as I had.

1) In my events java class I wrote the following code (which is an event
calling the method that deals with SOAP):

*   
public static String callMySoap(HttpServletRequest
request,HttpServletResponse response)
  { 
request.setAttribute("_EVENT_MESSAGE_", "You received this SOAP
response:" + MySoapClient());
return "success";
  } 



public static SOAPMessage MySoapClient()
{
try {
// Create SOAP Connection
SOAPConnectionFactory soapConnectionFactory =
SOAPConnectionFactory.newInstance();
SOAPConnection soapConnection =
soapConnectionFactory.createConnection();

// Send SOAP Message to SOAP Server
String url = "http://www.webservicex.net/geoipservice.asmx";;
SOAPMessage soapResponse =
soapConnection.call(createSOAPRequest(), url);

soapConnection.close();
return soapResponse;
} catch (Exception e) {
System.err.println("Error occurred while sending SOAP Request to
Server");
e.printStackTrace();
return null;
}   

}

private static SOAPMessage createSOAPRequest() throws Exception {
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage soapMessage = messageFactory.createMessage();
SOAPPart soapPart = soapMessage.getSOAPPart();

String serverURI = "http://www.webservicex.net/";;

// SOAP Envelope
SOAPEnvelope envelope = soapPart.getEnvelope();
envelope.addNamespaceDeclaration("web", serverURI);

/*
Constructed SOAP Request Message:
http://schemas.xmlsoap.org/soap/envelope/";
xmlns:example="http://www.webservicex.net/";>



192.168.1.2



 */

// SOAP Body
SOAPBody soapBody = envelope.getBody();
SOAPElement soapBodyElem = soapBody.addChildElement("GetGeoIP",
"web");
SOAPElement soapBodyElem1 =
soapBodyElem.addChildElement("IPAddress", "web");
soapBodyElem1.addTextNode("192.168.1.2");


MimeHeaders headers = soapMessage.getMimeHeaders();
headers.addHeader("SOAPAction", serverURI  + "GetGeoIP");

soapMessage.saveChanges();

/* Print the request message */
System.out.print("Request SOAP Message = ");
soapMessage.writeTo(System.out);
System.out.println();

return soapMessage;
}
*

2) I added the following request-map to point to my event:

*
  
  
  

*

3) I added the following view-map:

*

*

which points to the following screen widget:
*

  

  

  


   

  

  

*


Note:
 step 3 is not necessary. I only used it to see something on my screen.


Result:
 I can now see in real time the SOAP message that is being sent & the
response that is received.
and I can also this screen:
<http://ofbiz.135035.n4.nabble.com/file/n4646047/result.png> 


Now:
 the only thing I still need to do is some parsing on the SOAP response
message to be able to deal with the variables that interest me in that
message. I also need to enhance my code to make it more "generic" so that it
becomes somewhat dynamic and works with not only that specific Web Service
that I had to hardcode.

Do you have any suggestions for that? I do not want to be reinventing the
wheel!




--
View this message in context:
http://ofbiz.135035.n4.nabble.com/calling-external-SOAP-service-from-Ofbiz-t
p4646036p4646047.html
Sent from the OFBiz - User mailing list archive at Nabble.com.




Re: calling external SOAP service from Ofbiz

2013-12-03 Thread Jacques Le Roux
Inline ...

On Tuesday, December 03, 2013 5:24 PM jadelomeiri 
 wrote:
> Hello,
> 
> This is the solution I finally got. I hope it will be helpful for people
> having the same problem as I had.
> 
> 1) In my events java class I wrote the following code (which is an event
> calling the method that deals with SOAP):
> 
> *
> public static String callMySoap(HttpServletRequest
> request,HttpServletResponse response)
>  {
>request.setAttribute("_EVENT_MESSAGE_", "You received this SOAP
> response:" + MySoapClient());
>return "success";
>  }
> 
> 
> 
> public static SOAPMessage MySoapClient()
>{
>try {
>// Create SOAP Connection
>SOAPConnectionFactory soapConnectionFactory =
> SOAPConnectionFactory.newInstance();
>SOAPConnection soapConnection =
> soapConnectionFactory.createConnection();
> 
>// Send SOAP Message to SOAP Server
>String url = "http://www.webservicex.net/geoipservice.asmx";;
>SOAPMessage soapResponse =
> soapConnection.call(createSOAPRequest(), url);
> 
>soapConnection.close();
>return soapResponse;
>} catch (Exception e) {
>System.err.println("Error occurred while sending SOAP Request to
> Server");
>e.printStackTrace();
>return null;
>}
> 
>}
> 
>private static SOAPMessage createSOAPRequest() throws Exception {
>MessageFactory messageFactory = MessageFactory.newInstance();
>SOAPMessage soapMessage = messageFactory.createMessage();
>SOAPPart soapPart = soapMessage.getSOAPPart();
> 
>String serverURI = "http://www.webservicex.net/";;
> 
>// SOAP Envelope
>SOAPEnvelope envelope = soapPart.getEnvelope();
>envelope.addNamespaceDeclaration("web", serverURI);
> 
>/*
>Constructed SOAP Request Message:
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:example="http://www.webservicex.net/";>
>
>
>
>192.168.1.2
>
>
>
> */
> 
>// SOAP Body
>SOAPBody soapBody = envelope.getBody();
>SOAPElement soapBodyElem = soapBody.addChildElement("GetGeoIP",
> "web");
>SOAPElement soapBodyElem1 =
> soapBodyElem.addChildElement("IPAddress", "web");
>soapBodyElem1.addTextNode("192.168.1.2");
> 
> 
>MimeHeaders headers = soapMessage.getMimeHeaders();
>headers.addHeader("SOAPAction", serverURI  + "GetGeoIP");
> 
>soapMessage.saveChanges();
> 
>/* Print the request message */
>System.out.print("Request SOAP Message = ");
>soapMessage.writeTo(System.out);
>System.out.println();
> 
>return soapMessage;
>}
> *
> 
> 2) I added the following request-map to point to my event:
> 
> *
>  
>   invoke="callMySoap"/>
>  
>
> *
> 
> 3) I added the following view-map:
> 
> *
>  page="component://testapp/widget/TestAppScreens.xml#FeedbackMessages"/>
> *
> 
> which points to the following screen widget:
> *
>
>  
>
>   location="${parameters.mainDecoratorLocation}">
>
>  
>
>
> 
>
>  
>
>  
>
> *
> 
> 
> Note:
> step 3 is not necessary. I only used it to see something on my screen.
> 
> 
> Result:
> I can now see in real time the SOAP message that is being sent & the
> response that is received.
> and I can also this screen:
> 
> 
> 
> Now:
> the only thing I still need to do is some parsing on the SOAP response
> message to be able to deal with the variables that interest me in that
> message. I also need to enhance my code to make it more "generic" so that it
> becomes somewhat dynamic and works with not only that specific Web Service
> that I had to hardcode.
> 
> Do you have any suggestions for that? I do not want to be reinventing the
> wheel!

I did not look into the details and did not use SOAPConnection yet. But yes 
most of the time you need to handle yourself the SOAP response.
Another solution could be to use an ESB (ServiceMix for instance) to do the 
transformations of the SOAP envelopes. Disclaimer: I did not go that way yet..
Maybe it will be easier than trying to generalise by yourself. This said having 
a generalisation embedded in OFBiz would be great!

Jacques


Re: calling external SOAP service from Ofbiz

2013-12-03 Thread jadelomeiri
Hello,

This is the solution I finally got. I hope it will be helpful for people
having the same problem as I had.

1) In my events java class I wrote the following code (which is an event
calling the method that deals with SOAP):

*   
public static String callMySoap(HttpServletRequest
request,HttpServletResponse response)
  { 
request.setAttribute("_EVENT_MESSAGE_", "You received this SOAP
response:" + MySoapClient());
return "success";
  } 



public static SOAPMessage MySoapClient()
{
try {
// Create SOAP Connection
SOAPConnectionFactory soapConnectionFactory =
SOAPConnectionFactory.newInstance();
SOAPConnection soapConnection =
soapConnectionFactory.createConnection();

// Send SOAP Message to SOAP Server
String url = "http://www.webservicex.net/geoipservice.asmx";;
SOAPMessage soapResponse =
soapConnection.call(createSOAPRequest(), url);

soapConnection.close();
return soapResponse;
} catch (Exception e) {
System.err.println("Error occurred while sending SOAP Request to
Server");
e.printStackTrace();
return null;
}   

}

private static SOAPMessage createSOAPRequest() throws Exception {
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage soapMessage = messageFactory.createMessage();
SOAPPart soapPart = soapMessage.getSOAPPart();

String serverURI = "http://www.webservicex.net/";;

// SOAP Envelope
SOAPEnvelope envelope = soapPart.getEnvelope();
envelope.addNamespaceDeclaration("web", serverURI);

/*
Constructed SOAP Request Message:
http://schemas.xmlsoap.org/soap/envelope/";
xmlns:example="http://www.webservicex.net/";>



192.168.1.2



 */

// SOAP Body
SOAPBody soapBody = envelope.getBody();
SOAPElement soapBodyElem = soapBody.addChildElement("GetGeoIP",
"web");
SOAPElement soapBodyElem1 =
soapBodyElem.addChildElement("IPAddress", "web");
soapBodyElem1.addTextNode("192.168.1.2");


MimeHeaders headers = soapMessage.getMimeHeaders();
headers.addHeader("SOAPAction", serverURI  + "GetGeoIP");

soapMessage.saveChanges();

/* Print the request message */
System.out.print("Request SOAP Message = ");
soapMessage.writeTo(System.out);
System.out.println();

return soapMessage;
}
*

2) I added the following request-map to point to my event:

*
  
  
  
  
*

3) I added the following view-map:

*

*

which points to the following screen widget:
*

  

  

  


   

  

  

*


Note:
 step 3 is not necessary. I only used it to see something on my screen.


Result:
 I can now see in real time the SOAP message that is being sent & the
response that is received.
and I can also this screen:
<http://ofbiz.135035.n4.nabble.com/file/n4646047/result.png> 


Now:
 the only thing I still need to do is some parsing on the SOAP response
message to be able to deal with the variables that interest me in that
message. I also need to enhance my code to make it more "generic" so that it
becomes somewhat dynamic and works with not only that specific Web Service
that I had to hardcode.

Do you have any suggestions for that? I do not want to be reinventing the
wheel!




--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/calling-external-SOAP-service-from-Ofbiz-tp4646036p4646047.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: calling external SOAP service from Ofbiz

2013-12-03 Thread jadelomeiri
Dear Jacques,

Thanks a lot for your reply. I was thinking about writing a separate java
code using axis2, test it, and then integrate it in Ofbiz. Because of your
reply I am convinced to go with that solution. Another thank you also for
the link you provided me with. I will also check it.
Hopefully I will post my solution when it works.

Cheers,

Jad



Jacques Le Roux wrote
> BTW forgot, you might be interested by http://hessian.caucho.com/
> 
> Jacques
> 
> On Tuesday, December 03, 2013 11:13 AM Jacques Le Roux <

> jacques.le.roux@

> > wrote:
>> Actually if you look into services_test.xml you will see that there are
>> issues calling "external" SOAP services.
>> Though calling testRemoteSoap works calling testRemoteSoap1 and sequel 
>> don't.
>> I did not get a chance to continue to work on this and for now I rather
>> call "external" SOAP services directly from source code
>> 
>> Jacques
>> 
>> On Tuesday, December 03, 2013 10:18 AM jadelomeiri <

> jadelomeiri@.co

> > wrote:
>>> Note: in my controller.xml, I am including this handler
>>> *
> >
>> class="org.ofbiz.webapp.event.SOAPEventHandler"/>*
>>> 
>>> Thank you for any help!





--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/calling-external-SOAP-service-from-Ofbiz-tp4646036p4646042.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: calling external SOAP service from Ofbiz

2013-12-03 Thread jadelomeiri
Dear Deapak,

What you are saying is true if you're creating a service and want it to be
accessible via SOAP to other clients.
But in my case I only want to consume a web service.

Thanks anyways!
Regards

Jad



--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/calling-external-SOAP-service-from-Ofbiz-tp4646036p4646041.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: calling external SOAP service from Ofbiz

2013-12-03 Thread Jacques Le Roux
BTW forgot, you might be interested by http://hessian.caucho.com/

Jacques

On Tuesday, December 03, 2013 11:13 AM Jacques Le Roux 
 wrote:
> Actually if you look into services_test.xml you will see that there are 
> issues calling "external" SOAP services.
> Though calling testRemoteSoap works calling testRemoteSoap1 and sequel  don't.
> I did not get a chance to continue to work on this and for now I rather call 
> "external" SOAP services directly from source code
> 
> Jacques
> 
> On Tuesday, December 03, 2013 10:18 AM jadelomeiri 
>  wrote:
>> Note: in my controller.xml, I am including this handler
>> *> class="org.ofbiz.webapp.event.SOAPEventHandler"/>*
>> 
>> Thank you for any help!


Re: calling external SOAP service from Ofbiz

2013-12-03 Thread Jacques Le Roux
Actually if you look into services_test.xml you will see that there are issues 
calling "external" SOAP services.
Though calling testRemoteSoap works calling testRemoteSoap1 and sequel  don't.
I did not get a chance to continue to work on this and for now I rather call 
"external" SOAP services directly from source code

Jacques

On Tuesday, December 03, 2013 10:18 AM jadelomeiri 
 wrote:
> Note: in my controller.xml, I am including this handler
> * class="org.ofbiz.webapp.event.SOAPEventHandler"/>*
> 
> Thank you for any help!


Re: calling external SOAP service from Ofbiz

2013-12-03 Thread Deepak Agarwal
I believe service should have engine="java" ? export="true" exposes it as
soap implicitly


On Tue, Dec 3, 2013 at 2:48 PM, jadelomeiri
wrote:

> Note: in my controller.xml, I am including this handler
> * class="org.ofbiz.webapp.event.SOAPEventHandler"/>*
>
> Thank you for any help!
>
>
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/calling-external-SOAP-service-from-Ofbiz-tp4646036p4646037.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>



-- 
Thanks,
Deepak Agarwal,

Mobile: +91 9501190044


Re: calling external SOAP service from Ofbiz

2013-12-03 Thread jadelomeiri
Note: in my controller.xml, I am including this handler
**

Thank you for any help!



--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/calling-external-SOAP-service-from-Ofbiz-tp4646036p4646037.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


calling external SOAP service from Ofbiz

2013-12-03 Thread jadelomeiri
Hello,

I am using ofbiz 12.04.02

I tried to create services (java,groovy...) and I was perfectly able to call
them and use them. I was also able to call services from other services.
Everything is fine and I am able to run them from web tools as well as
accessing them through a uri (defined in a request-map).

My only problem is with calling external SOAP services from Ofbiz.
I am defining my service like that:

*http://www.webservicex.net/geoipservice.asmx?WSDL";
invoke="GetGeoIP">
A service to invoke the GeoIP web service
http://www.webservicex.net/


 *

But it's not working. I am trying to run it through web tool, and giving it
the required input but the error I get is the following: /"Service
dispatcher threw an exception:Service did not return expected result"/

I tried calling the web service from SoapUI, and I it is perfectly working!

I am now sure that when using Ofbiz, my SOAP message is being sent. Because
at least I am receiving back the following message:

/
http://schemas.xmlsoap.org/soap/envelope/";>

http://ofbiz.apache.org/service/";>





















/

which means that the problem is with the SOAP message content that is being
sent from Ofbiz.

Now my question is: is there a way to see the SOAP message contents that are
being sent from ofbiz? If yes this would help me a lot in comparing the
message with the one being sent from SoapUI.
If not, do you have any other idea about how I could actually solve my
problem?






--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/calling-external-SOAP-service-from-Ofbiz-tp4646036.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: external soap service

2009-08-24 Thread Mridul Pathak
Hi Chris,
You can refer specialpurpose/oagis component for other examples of OFBiz
interacting with web services.  For example, oagisSendConfirmBod,
oagisSendReceiveDelivery, oagisSendProcessShipment, etc.  All these services
post xml templates as streams to external web services.  There are other
examples in USPSSevices.java file as well.  Hope that helps.

-- 
Thanks & Regards
Mridul Pathak
Hotwax Media
http://www.hotwaxmedia.com
mridul.pat...@hotwaxmedia.com

On Mon, Aug 24, 2009 at 7:19 PM, snowc  wrote:

>
> Hi Vivek,
>
> I'm trying to call a web service outside of ofbiz where ofbiz is the client
> to that web service.  I am not trying to export my code as a web service.
>
> Cheers,
>
> Chris
>
>
> Vivek Mishra-2 wrote:
> >
> > Hi,
> >
> > This link may help you to understand the concept
> >
> http://docs.ofbiz.org/display/OFBIZ/Export+Ofbiz+Services+that+use+complex+type+parameters+via+SOAP+using+AXIS2
> >
> > Thanks and Regards,
> > --
> > Vivek Mishra
> >
> > snowc wrote:
> >> I'm trying to call an external soap service.  My service definition is:
> >>
> >>   >>  location="
> http://www.q.hpi.co.uk/tradeservice/servlet/messagerouter";
> >>  invoke="enquire">
> >>
> >>  urn:enquiry
> >> 
> >> 
> >>  
> >>
> >> My bsh:
> >>
> >> delegator = GenericDelegator.getGenericDelegator("default");
> >> dispatcher = GenericDispatcher.getLocalDispatcher("mydelegator",
> >> delegator);
> >> userLogin = delegator.findByPrimaryKey("UserLogin",
> >> UtilMisc.toMap("userLoginId", "admin"));
> >>
> >> message =
> >> "" +
> >> " " +
> >> " " +
> >> " CUSTCODE" +
> >> " CC" +
> >> " PASSWORD" +
> >> " " +
> >> " " +
> >> " " +
> >> " " +
> >> "" +
> >> "" +
> >> " " +
> >> " " +
> >> " " +
> >> " " +
> >> " " +
> >> "";
> >>
> >> Map serviceCtx = UtilMisc.toMap("message", message, "userLogin",
> >> userLogin);
> >> resultMap = dispatcher.runSync("HpiLookup", serviceCtx);
> >>
> >> --
> >>
> >> The message input attribute is getting encoded (see below), but I just
> >> want
> >> to send the message as a raw string.  Is this possible? Many thanks in
> >> advance...
> >>
> >> POST /tradeservice/servlet/messagerouter HTTP/1.0
> >> Content-Type: text/xml; charset=utf-8
> >> Accept: application/soap+xml, application/dime, multipart/related,
> text/*
> >> User-Agent: Axis/1.4
> >> Host: www.q.hpi.co.uk
> >> Cache-Control: no-cache
> >> Pragma: no-cache
> >> SOAPAction: ""
> >> Content-Length: 948
> >>
> >>  >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> >> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
> "> >> xmlns=""><hpi:enquire
> >> xmlns:hpi="urn:enquiry"> <hpi:Authentication>
> >> <hpi:CustomerDetails>
> >> <hpi:CustomerCode>CUSTCODE</hpi:CustomerCode>
> >> <hpi:Initials>CC</hpi:Initials>
> >> <hpi:Password>PASSWORD</hpi:Password>
> >> </hpi:CustomerDetails> </hpi:Authentication>
> >> <hpi:Request>
> >> <hpi:Asset>
> >> <hpi:Vrm></hpi:Vrm>...<hpi:Vin></hpi:Vin>
> >> </hpi:Asset> <hpi:Product>
> >> <hpi:Code></hpi:Code> </hpi:Product>
> >>
> </hpi:Request></hpi:enquire>
> >>
> >>
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/external-soap-service-tp25115630p25116391.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>


Re: external soap service

2009-08-24 Thread snowc

Hi Vivek,

I'm trying to call a web service outside of ofbiz where ofbiz is the client
to that web service.  I am not trying to export my code as a web service.

Cheers,

Chris


Vivek Mishra-2 wrote:
> 
> Hi,
> 
> This link may help you to understand the concept
> http://docs.ofbiz.org/display/OFBIZ/Export+Ofbiz+Services+that+use+complex+type+parameters+via+SOAP+using+AXIS2
> 
> Thanks and Regards,
> --
> Vivek Mishra
> 
> snowc wrote:
>> I'm trying to call an external soap service.  My service definition is:
>>
>>  >  
>> location="http://www.q.hpi.co.uk/tradeservice/servlet/messagerouter"; 
>>  invoke="enquire">
>>
>>  urn:enquiry
>> 
>> 
>>  
>>
>> My bsh:
>>
>> delegator = GenericDelegator.getGenericDelegator("default");
>> dispatcher = GenericDispatcher.getLocalDispatcher("mydelegator",
>> delegator);
>> userLogin = delegator.findByPrimaryKey("UserLogin",
>> UtilMisc.toMap("userLoginId", "admin"));
>>
>> message = 
>> "" +
>> " " +
>> " " +
>> " CUSTCODE" +
>> " CC" +
>> " PASSWORD" +
>> " " +
>> " " +
>> " " +
>> " " +
>> "" +
>> "" +
>> " " +
>> " " +
>> " " +
>> " " +
>> " " +
>> "";
>>
>> Map serviceCtx = UtilMisc.toMap("message", message, "userLogin",
>> userLogin);
>> resultMap = dispatcher.runSync("HpiLookup", serviceCtx);
>>
>> --
>>
>> The message input attribute is getting encoded (see below), but I just
>> want
>> to send the message as a raw string.  Is this possible? Many thanks in
>> advance...
>>
>> POST /tradeservice/servlet/messagerouter HTTP/1.0
>> Content-Type: text/xml; charset=utf-8
>> Accept: application/soap+xml, application/dime, multipart/related, text/*
>> User-Agent: Axis/1.4
>> Host: www.q.hpi.co.uk
>> Cache-Control: no-cache
>> Pragma: no-cache
>> SOAPAction: ""
>> Content-Length: 948
>>
>> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>> xmlns=""><hpi:enquire
>> xmlns:hpi="urn:enquiry"> <hpi:Authentication>
>> <hpi:CustomerDetails>
>> <hpi:CustomerCode>CUSTCODE</hpi:CustomerCode>
>> <hpi:Initials>CC</hpi:Initials>
>> <hpi:Password>PASSWORD</hpi:Password>
>> </hpi:CustomerDetails> </hpi:Authentication>
>> <hpi:Request>
>> <hpi:Asset>   
>> <hpi:Vrm></hpi:Vrm>...<hpi:Vin></hpi:Vin>
>> </hpi:Asset> <hpi:Product>
>> <hpi:Code></hpi:Code> </hpi:Product>
>> </hpi:Request></hpi:enquire>
>>
>>   
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/external-soap-service-tp25115630p25116391.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: external soap service

2009-08-24 Thread Vivek Mishra

Hi,

This link may help you to understand the concept
http://docs.ofbiz.org/display/OFBIZ/Export+Ofbiz+Services+that+use+complex+type+parameters+via+SOAP+using+AXIS2

Thanks and Regards,
--
Vivek Mishra

snowc wrote:

I'm trying to call an external soap service.  My service definition is:

			location="http://www.q.hpi.co.uk/tradeservice/servlet/messagerouter"; 
			invoke="enquire">


urn:enquiry




My bsh:

delegator = GenericDelegator.getGenericDelegator("default");
dispatcher = GenericDispatcher.getLocalDispatcher("mydelegator", delegator);
userLogin = delegator.findByPrimaryKey("UserLogin",
UtilMisc.toMap("userLoginId", "admin"));

message = 
"" +

" " +
" " +
" CUSTCODE" +
" CC" +
" PASSWORD" +
" " +
" " +
" " +
" " +
"" +
"  " +
" " +
" " +
" " +
" " +
" " +
"";

Map serviceCtx = UtilMisc.toMap("message", message, "userLogin", userLogin);
resultMap = dispatcher.runSync("HpiLookup", serviceCtx);

--

The message input attribute is getting encoded (see below), but I just want
to send the message as a raw string.  Is this possible? Many thanks in
advance...

POST /tradeservice/servlet/messagerouter HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: www.q.hpi.co.uk
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 948

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><hpi:enquire
xmlns:hpi="urn:enquiry"> <hpi:Authentication>
<hpi:CustomerDetails>
<hpi:CustomerCode>CUSTCODE</hpi:CustomerCode>
<hpi:Initials>CC</hpi:Initials>
<hpi:Password>PASSWORD</hpi:Password>
</hpi:CustomerDetails> </hpi:Authentication> <hpi:Request>
<hpi:Asset>   
<hpi:Vrm></hpi:Vrm>...<hpi:Vin></hpi:Vin>
</hpi:Asset> <hpi:Product>
<hpi:Code></hpi:Code> </hpi:Product>

</hpi:Request></hpi:enquire>

  


smime.p7s
Description: S/MIME Cryptographic Signature


external soap service

2009-08-24 Thread snowc

I'm trying to call an external soap service.  My service definition is:

http://www.q.hpi.co.uk/tradeservice/servlet/messagerouter"; 
invoke="enquire">

urn:enquiry




My bsh:

delegator = GenericDelegator.getGenericDelegator("default");
dispatcher = GenericDispatcher.getLocalDispatcher("mydelegator", delegator);
userLogin = delegator.findByPrimaryKey("UserLogin",
UtilMisc.toMap("userLoginId", "admin"));

message = 
"" +
" " +
" " +
" CUSTCODE" +
" CC" +
" PASSWORD" +
" " +
" " +
" " +
" " +
"" +
"   " +
" " +
" " +
" " +
" " +
" " +
"";

Map serviceCtx = UtilMisc.toMap("message", message, "userLogin", userLogin);
resultMap = dispatcher.runSync("HpiLookup", serviceCtx);

--

The message input attribute is getting encoded (see below), but I just want
to send the message as a raw string.  Is this possible? Many thanks in
advance...

POST /tradeservice/servlet/messagerouter HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: www.q.hpi.co.uk
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 948

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><hpi:enquire
xmlns:hpi="urn:enquiry"> <hpi:Authentication>
<hpi:CustomerDetails>
<hpi:CustomerCode>CUSTCODE</hpi:CustomerCode>
<hpi:Initials>CC</hpi:Initials>
<hpi:Password>PASSWORD</hpi:Password>
</hpi:CustomerDetails> </hpi:Authentication> <hpi:Request>
<hpi:Asset>   
<hpi:Vrm></hpi:Vrm>...<hpi:Vin></hpi:Vin>
</hpi:Asset> <hpi:Product>
<hpi:Code></hpi:Code> </hpi:Product>
</hpi:Request></hpi:enquire>

-- 
View this message in context: 
http://www.nabble.com/external-soap-service-tp25115630p25115630.html
Sent from the OFBiz - User mailing list archive at Nabble.com.