[esb-java-user] invoking websphere service

Schmilinsky, Remsy Remsy.Schmilinsky at cbsa-asfc.gc.ca
Tue Dec 23 05:26:40 PST 2008


Thanks a lot Indika, the xsl worked fine. Once I get the response, I get
this error:

 

2008-12-23 08:23:04,296 [7.28.130.231-wh24cu6052] [jms-Worker-2]  INFO
LogMediator To: fullWSAction: urn:mediatefullSOAPAction:
urn:mediatefullMessageID:
ID:c3e2d840d4d8c8f54040404040404040c37c6edb79a01e04fullDirection:
request

 

2008-12-23 08:23:04,327 [7.28.130.231-wh24cu6052] [HttpClientWorker-2]
INFO LogMediator To:
http://www.w3.org/2005/08/addressing/anonymousfullWSAction:
fullSOAPAction: fullMessageID:
urn:uuid:97991FF7FC23D269F481113139189448-1803939154fullDirection:
response

 

2008-12-23 08:23:09,312 [7.28.130.231-wh24cu6052] [I/O dispatcher 2]
WARN ClientHandler Unexpected HTTP status code received : 408 :: Request
Timeout

 

2008-12-23 08:23:09,312 [7.28.130.231-wh24cu6052] [I/O dispatcher 2]
WARN ClientHandler Received an unexpected response - of content type :
text/html and status code : 408 with reason : Request Timeout

 

2008-12-23 08:23:09,312 [7.28.130.231-wh24cu6052] [I/O dispatcher 2]
WARN HttpCoreNIOSender System may be unstable: IOReactor encountered a
runtime exception : null

java.lang.NullPointerException

            at
org.apache.synapse.transport.nhttp.ClientWorker.<init>(ClientWorker.java
:79)

            at
org.apache.synapse.transport.nhttp.ClientHandler.processResponse(ClientH
andler.java:547)

            at
org.apache.synapse.transport.nhttp.ClientHandler.responseReceived(Client
Handler.java:523)

            at
org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(Defau
ltNHttpClientConnection.java:125)

            at
org.apache.http.impl.nio.DefaultClientIOEventDispatch.inputReady(Default
ClientIOEventDispatch.java:99)

            at
org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.ja
va:98)

            at
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(Abstract
IOReactor.java:195)

            at
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(Abstrac
tIOReactor.java:180)

            at
org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIORea
ctor.java:142)

            at
org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.jav
a:70)

            at
org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run
(AbstractMultiworkerIOReactor.java:318)

            at java.lang.Thread.run(Thread.java:595)

 

 

________________________________

From: esb-java-user-bounces at wso2.org
[mailto:esb-java-user-bounces at wso2.org] On Behalf Of Indika Kumara
Sent: December 23, 2008 3:33 AM
To: esb-java-user at wso2.org
Subject: Re: [esb-java-user] invoking websphere service

 

Hi Remsy 

You can do a simple xslt transformation using xslt script like as bellow


 

xsl:stylesheet version="2.0" 

            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<http://www.w3.org/1999/XSL/Transform>  

            xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
<http://www.w3.org/2005/02/xpath-functions> 

            xmlns:m0="http://ws.apache.org/commons/ns/payload"
<http://ws.apache.org/commons/ns/payload> 

            exclude-result-prefixes="m0 fn">

<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>

 

<xsl:template match="/">

  <xsl:apply-templates select="//m0:text" /> 

</xsl:template>

  

<xsl:template match="m0:text">

 

<ws:processMessage xmlns:ws="http://ws.remsy.ca/" <http://ws.remsy.ca/>
>

            <ws:msgIn>

           <xsl:value-of select="."/>

    </ws:msgIn>

</ws:processMessage>

 

</xsl:template>

</xsl:stylesheet>

 

 

And thing you need to know, it is possible to change the wrapping outer
element name adding parameter to service ( or proxy service) which used
to listen JMS ,Mail , VFS . 

 

<parameter name="Wrapper">{namespace URI}wrapper element
name</parameter> 

For example: 

<parameter name="Wrapper">{http://services.samples
<http://services.samples> }getQuote</parameter> 

Sample 252 uses demonstrates this 

And simple custom mediator that deals with payload too work for you.


Thanks
Indika 



 


Schmilinsky, Remsy wrote: 

Here is another sample, obtained from SoapUI tool:
 
POST http://localhost:9080/testWS/services/Test HTTP/1.1
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost:9080
Content-Length: 275
 
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
<http://schemas.xmlsoap.org/soap/envelope/> 
xmlns:ws="http://ws.remsy.ca" <http://ws.remsy.ca> >
   <soapenv:Header/>
   <soapenv:Body>
      <ws:processMessage>
         <ws:msgIn>message text</ws:msgIn>
      </ws:processMessage>
   </soapenv:Body>
</soapenv:Envelope>
 
Where "message text" comes from JMS, so how can I modify the message
context to construct a request like this to the soap endpoint? Need to
add any parameters? 
 
Thanks
 
Remsy
 
-----Original Message-----
From: Schmilinsky, Remsy 
Sent: December 22, 2008 10:14 AM
To: 'esb-java-user at wso2.org'
Subject: RE: [esb-java-user] invoking websphere service
 
Hi Paul, the request should look like this:
 
<?xml version="1.0" encoding="UTF-8" ?> 
<soapenv:Envelope xmlns:q0="http://ws.remsy.ca" <http://ws.remsy.ca> 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
<http://schemas.xmlsoap.org/soap/envelope/> 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
<http://www.w3.org/2001/XMLSchema> 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<http://www.w3.org/2001/XMLSchema-instance> >
<soapenv:Body>
<q0:processMessage>
<msgIn>some text...</msgIn> 
</q0:processMessage>
</soapenv:Body>
</soapenv:Envelope>
 
 
-----Original Message-----
From: esb-java-user-bounces at wso2.org
[mailto:esb-java-user-bounces at wso2.org] On Behalf Of Paul Fremantle
Sent: December 19, 2008 10:28 AM
To: esb-java-user at wso2.org
Subject: Re: [esb-java-user] invoking websphere service
 
Remsy
 
It looks like you are trying to link an ESB file or JMS text service 
with a WSDL defined endpoint.
 
When you read files, JMS or other non-XML data into the ESB we logically
 
create a SOAP envelope to handle that data. Usually that never leaves 
the ESB, because typically you would either transform it into XML or 
store it in another file. But you are sending it on to a Web Service, 
which is expecting some other XML format. You need to transform this 
using a mediator or E4X, XSL etc.
 
If you give me some better ideas about what you are doing I can maybe 
help some more.
 
Paul
 
Schmilinsky, Remsy wrote:
  

	Hi, I have an endpoint with a simple web service deployed on
	    

websphere.
  

	I get a soap fault saying "Could not resolve to an operation.
The
	message contains an element named
	""{http://ws.apache.org/commons/ns/payload}text"", but this does
not
	match any operation of the target port.
	 
	Endpoint is configured like this:
	 
	<syn:endpoint name="testWS">
	        <syn:address
uri="http://localhost:9080/testWS/services/Test"
<http://localhost:9080/testWS/services/Test> 
	format="soap11">
	            <enableAddressing/>
	        </syn:address>
	</syn:endpoint>
	 
	Do you know how to resolve this? Below is the full response:
	 
	<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
<http://schemas.xmlsoap.org/soap/envelope/> 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<http://www.w3.org/2001/XMLSchema-instance> 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
<http://www.w3.org/2001/XMLSchema> 
	 
	    

xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
<http://schemas.xmlsoap.org/soap/encoding/> ><soapenv:Body>
  
<soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>WSWS327
  

	7E: Error: Could not resolve to an operation.  The message
contains an
	element named ""{http://ws.apache.org/commons/ns/payload}text"",
but
	this does not match any operation of the target port. Debug:
name:
	services/Test
	implClass:       class ca.remsy.test.Test
	implClassLoader: 
	com.ibm.ws.classloader.CompoundClassLoader at 6b1c6b1c
	   Local ClassPath: C:\Documents and
	 
	    

Settings\remsy\IBM\rationalsdp7.0\workspace\testWS\WebContent\WEB-INF\cl
  

	asses;C:\Documents and
	Settings\remsy\IBM\rationalsdp7.0\workspace\testWS\WebContent
	   Delegation Mode: PARENT_FIRST
	defaultNS:       null
	endpointURL:     null
	 OperationDesc[0]:
	  name:        processMessage
	  returnQName: processMessageReturn
	  returnType:  {http://www.w3.org/2001/XMLSchema}string
	  returnClass: class java.lang.String
	  elementQName:{http://test.remsy.ca}processMessage
	  soapAction:  processMessage
	  style:       wrapped
	  use:         literal
	  numInParams: 1
	  properties: 
	   KEY(ResponseNamespace)
	    VALUE(http://test.remsy.ca)
	   KEY(ResponseLocalPart)
	    VALUE(processMessageResponse)
	   KEY(buildNum)
	    VALUE(cf90721.10)
	   KEY(ServiceQName)
	    VALUE({http://test.remsy.ca}TestService)
	   KEY(portTypeQName)
	    VALUE({http://test.remsy.ca}Test)
	   KEY(outputName)
	    VALUE(processMessageResponse)
	   KEY(inputMessageQName)
	    VALUE({http://test.remsy.ca}processMessageRequest)
	   KEY(outputMessageQName)
	    VALUE({http://test.remsy.ca}processMessageResponse)
	   KEY(usingAddressing)
	    VALUE(false)
	   KEY(inputName)
	    VALUE(processMessageRequest)
	   KEY(targetNamespace)
	    VALUE(http://test.remsy.ca)
	  method:public java.lang.String
	ca.remsy.test.Test.processMessage(java.lang.String)
	   ParameterDesc[0]:
	    identity:
	com.ibm.ws.webservices.engine.description.ParameterDesc at cec0cec
	  name:       msg
	  mode:       IN
	  isReturn:   false
	  typeQName:  {http://www.w3.org/2001/XMLSchema}string
	  javaType:   class java.lang.String
	  javaSigType:class java.lang.String
	  inHeader:   false
	  outHeader:  false
	  minOccursIs0:false
	  maxOccursIs1:true
	  properties: 
	   KEY(partName)
	    VALUE(string)
	   KEY(partQNameString)
	    VALUE({http://www.w3.org/2001/XMLSchema}string)
	 
	 
	</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>
	 
	 
	 
	_______________________________________________
	Esb-java-user mailing list
	Esb-java-user at wso2.org
	https://wso2.org/cgi-bin/mailman/listinfo/esb-java-user
	 
	    

 
  
 



________________________________



 
 
No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.176 / Virus Database: 270.10.0/1861 - Release Date:
12/22/2008 11:23 AM
 
  

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wso2.org/pipermail/esb-java-user/attachments/20081223/75705fa0/attachment-0001.htm 


More information about the Esb-java-user mailing list