ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WSDL with SOAP/JMS generated from toolkit failed on RAD

Post new topic  Reply to topic
 WSDL with SOAP/JMS generated from toolkit failed on RAD « View previous topic :: View next topic » 
Author Message
jamesyu
PostPosted: Wed Jan 31, 2007 2:41 pm    Post subject: WSDL with SOAP/JMS generated from toolkit failed on RAD Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

Hi All,

I've created a very simple flow with a very simple message set in toolkit 6.0.2 (this flow and message set work fine). Then I generated a WSDL based on that message set with SOAP over JMS binding (document/literal) by the Wizard in toolkit. So far, so good!

Then I need to call this Broker Web Service from a J2EE web application on WAS. First, I imported both the WSDL and the schema files into a web project in RAD 6.0.1. Then I opened a Wizard in RAD trying to generate a Web Service Client based on this WSDL. Unfortunately, the Wizard failed with some errors returned as shown below:

Error messages were issued.
WSWS3574E: ---------- FATAL ERRORS ENCOUNTERED ----------
GENERATION OF ARTIFACTS HAS BEEN SUSPENDED.
See messages to follow for more details.

WSWS3205E: Error: Type {http://www.w3.org/2001/XMLSchema}customer_id is referenced but not defined.

Has anyone ever tried to create a WSDL with SOAP over JMS from the toolkit, and call this WSDL from a J2EE web application? Any ideas would be greatly appreciated.

Thanks,
James
Back to top
View user's profile Send private message
pathipati
PostPosted: Wed Jan 31, 2007 4:49 pm    Post subject: Reply with quote

Master

Joined: 03 Mar 2006
Posts: 296

In the WSDL that you exported do you've any references to any XSDs(Business Objects)? If possible can you post your WSDL here?
Back to top
View user's profile Send private message Yahoo Messenger
jamesyu
PostPosted: Thu Feb 01, 2007 6:30 pm    Post subject: Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

Here is my WSDL:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:jms="http://schemas.xmlsoap.org/soap/jms" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://tempuri.org/James_SampleSet" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="James_SampleSet" targetNamespace="http://tempuri.org/James_SampleSet">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:mrm="http://tempuri.org/James_SampleSet" targetNamespace="http://tempuri.org/James_SampleSet">
<include schemaLocation="Customer.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="getCustomer_in">
<wsdl:part element="tns:query" name="query"/>
</wsdl:message>
<wsdl:message name="getCustomer_out">
<wsdl:part element="tns:customer" name="customer"/>
</wsdl:message>
<wsdl:portType name="James_SampleSetPortType">
<wsdl:operation name="getCustomer">
<wsdl:input message="tns:getCustomer_in" name="getCustomer_query"/>
<wsdl:output message="tns:getCustomer_out" name="getCustomer_customer"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="James_SampleSetSOAP_JMS_Binding" type="tns:James_SampleSetPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms"/>
<wsdl:operation name="getCustomer">
<soap:operation/>
<wsdl:input name="getCustomer_query">
<soap:body parts="query" use="literal"/>
</wsdl:input>
<wsdl:output name="getCustomer_customer">
<soap:body parts="customer" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="James_SampleSetSOAP_JMS_Service">
<wsdl:port binding="tns:James_SampleSetSOAP_JMS_Binding" name="JMSSOAPPort">
<soap:address location="jms:/queue?destination=jms/aQueue&amp;connectionFactory=jms/aQCF&amp;targetService=James_SampleSetSOAP_JMS_Service&amp;initialContextFactory=com.ibm.websphere.naming.WsnInitialContextFactory&amp;jndiProviderURL=iiop://localhost"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>


Here is my schema:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="customer_name">
<xsd:sequence>
<xsd:element name="last_name" type="xsd:string"/>
<xsd:element name="first_name" type="xsd:string"/>
<xsd:element name="sex" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="customer_id">
<xsd:sequence>
<xsd:element name="id" type="xsd:string"/>
<xsd:element name="type" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="customer" type="customer_name"/>
<xsd:element name="query" type="customer_id"/>
</xsd:schema>

Looks like the "include" in WSDL doesn't work properly (don't know why), so I replaced the include with the real schema in WSDL....

Now I am able to generate a Web service client in RAD with Java proxy and sample JSPs for testing. The thing is, I am only able to send a request to my flow through the TestClient.jsp in RAD, not able to get a response back with the TestClient.jsp with an exception of "Request timeout exceeded".

How am I able to test this two-way operation specified in WSDL with SOAP over JMS binding in RAD? At least this generated Web service client can pick up the response from my flow. By the way, my flow begins with a MQInput node, ends with a MQOutput noe. On WebSphere Test Environment, I configured MQ as my JMS provider.

Any ideas?


Last edited by jamesyu on Thu Feb 01, 2007 6:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
pathipati
PostPosted: Thu Feb 01, 2007 6:36 pm    Post subject: Reply with quote

Master

Joined: 03 Mar 2006
Posts: 296

You said you are able to post the request and you are not getting response, but what I want to see is does your request invoke the process? Just give some print statements in your process and see if it prints when you invoke that process?
You need wsdl, schema and Customer.xsd also in your client application..
Back to top
View user's profile Send private message Yahoo Messenger
jamesyu
PostPosted: Fri Feb 02, 2007 8:10 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

pathipati wrote:
You said you are able to post the request and you are not getting response, but what I want to see is does your request invoke the process? Just give some print statements in your process and see if it prints when you invoke that process?
You need wsdl, schema and Customer.xsd also in your client application..


Here is what I did:
1. imported WSDL to a J2EE web project created in RAD 6.0.1
2. generated the Web service client based on this WSDL using the Wizard provided in RAD. Some sample JSPs were also generated, such as TestClient.jsp
3. configured all JMS related properties on WAS test environment (JMS provider is WebSphere MQ)
4. run the TestClient.jsp on WAS test environment
5. invoke the method from TestClient.jsp
6. the flow executes
7. In MQ explorer, the response message is created on an output / reply queue
8. Back to RAD, the TestClient is still waiting for the response until timed out, since this is a request-response operation. I think the client just simply doesn't know where to pick up a response from. I could write some some JMS program to retrieve the response, but the point is, this is not part of the WSDL. The client should only deal with WSDL.

Any ideas?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 02, 2007 4:12 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Most request response patterns expect the reply to information to be on the requester's message. Here you reply to information seems no to be dynamic. You should look into incorporating this information(JMS reply to Destination) into your requester. It could then pick up the message from the reply to queue.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jamesyu
PostPosted: Mon Feb 05, 2007 5:55 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

fjb_saper wrote:
Most request response patterns expect the reply to information to be on the requester's message. Here you reply to information seems no to be dynamic. You should look into incorporating this information(JMS reply to Destination) into your requester. It could then pick up the message from the reply to queue.

Enjoy


Thank you for your response. Isn't this something RAD should generate for me based on WSDL?

The thing is, RAD automatically generates a Java proxy based on the WSDL from toolkit. The client program just simply talks to this Java proxy via a method to send a request (a Java object) over and get a response (a Java object) back. All the low-level JMS implementation has been hidden from clients. So the client has no reference to any JMS/MQ APIs in client's code. How can I tell my client where the response is since I have no control on MQJD/MQMD?

Any more thoughts? Or has anyone ever called "SOAP/JMS with a two-way operation built in broker" from a J2EE servlet?

Thanks,
James
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Feb 05, 2007 5:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I would expect that RAD would generate code that would create a dynamic replyto destination, and populate that properly on the message.

The most likely cause of your difficulty is that your service provider is not building the reply message properly, and so the client doesn't identify that the reply on the queue is the one that it's waiting for.

Debugging should show this.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jamesyu
PostPosted: Mon Feb 05, 2007 7:08 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

jefflowrey wrote:
I would expect that RAD would generate code that would create a dynamic replyto destination, and populate that properly on the message.

The most likely cause of your difficulty is that your service provider is not building the reply message properly, and so the client doesn't identify that the reply on the queue is the one that it's waiting for.

Debugging should show this.


Now we are on the same page. I can debug the Java proxy code to see whether or not the code handles this "replyToQueue" properly, but I doubt if I could get into that much deep level since RAD doesn't provide all of the source Java code for client.

Any more thoughts?

Thanks,
James
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 05, 2007 2:19 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

If it is rad generated code you should have the possibility to keep the source around (-keep ?) or something like that.

That should then allow you to debug fully the proxy.

It might as well be that the wsdl needs to be altered to include a fixed replyto destination and the proxy regenerated... Dynamic reply to destinations are usually not suitable for persistent messages....

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
msedmak
PostPosted: Tue May 15, 2007 4:55 am    Post subject: Same problem, but... Reply with quote

Newbie

Joined: 15 May 2007
Posts: 3

Hi all,

I ran into the same problem like jamesyu and found this topic.
When i was going through his checklist, this cought my attention:
Quote:

3. configured all JMS related properties on WAS test environment (JMS provider is WebSphere MQ)


I understand the concept of a JMS provider, and i configured one (and a queueConnectionFactory and a queue, should i have done more or less??) but my test client falls apart with:

Code:

WSWS3016E: Caught JMSException: javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager
WSWS3017E: Linked Exception: com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2035
MQJE036: Queue manager rejected connection attempt


As far as i've read on this forum, this is a security issue, but my security on the queue_manager does not require any credentials whatsoever...

Any insight?

Thanks in advance!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WSDL with SOAP/JMS generated from toolkit failed on RAD
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.