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 » IBM MQ Java / JMS » Java SOAP with JMS IBM MQ transport - noCFName

Post new topic  Reply to topic
 Java SOAP with JMS IBM MQ transport - noCFName « View previous topic :: View next topic » 
Author Message
bbcno
PostPosted: Fri Sep 29, 2017 1:34 am    Post subject: Java SOAP with JMS IBM MQ transport - noCFName Reply with quote

Newbie

Joined: 29 Sep 2017
Posts: 6

We have a java desktop application and need to call a web service from a customer. We have received the wsdl-file and the server side endpoint URL. It is built on dotNET / WCF and IBM MQ 8.

I believe we need to take the JAX-RPC approach, so I'm trying to follow this guide : Developing a JAX-RPC client for WebSphere transport for SOAP using Eclipse

I have installed IBM MQ 8 and created a project in Eclipse. I have added the jars from IBM_INSTALL\lib and IBM_INSTALL\lib\soap.

I have imported the wsdl to the project and generated the web service client using Eclipse and Axis.

Getting "You must have 1 post before you can post URLs/Links", continuing in next post.
Back to top
View user's profile Send private message
bbcno
PostPosted: Fri Sep 29, 2017 1:38 am    Post subject: Reply with quote

Newbie

Joined: 29 Sep 2017
Posts: 6

Code:

   public static void main(String[] args) throws MalformedURLException, ServiceException, Error, RemoteException{   
      com.ibm.mq.soap.Register.extension();
      Wf1AGwImplLocator locator = new Wf1AGwImplLocator();
      String endpoint = "xxx";
      IWf1AGw service = locator.getBasicHttpBinding_IWf1aGw(new URL(endpoint));
      
      service.dispatch("", "", "", "", "",false, "", "", 1, Calendar.getInstance(), false, "", "");
   }


I get the following error message when calling dispatch():

Quote:
Caused by: java.lang.IllegalArgumentException: noCFName
at org.apache.axis.components.jms.JNDIVendorAdapter.getConnectionFactory(JNDIVendorAdapter.java:71)
at org.apache.axis.components.jms.JNDIVendorAdapter.getQueueConnectionFactory(JNDIVendorAdapter.java:55)
at org.apache.axis.transport.jms.JMSConnectorFactory.createConnector(JMSConnectorFactory.java:227)
at org.apache.axis.transport.jms.JMSConnectorFactory.createClientConnector(JMSConnectorFactory.java:178)
at org.apache.axis.transport.jms.JMSConnectorManager.getConnector(JMSConnectorManager.java:107)
... 8 more


The endpoint URL used is:

jms:/queue?destination=QG.WF1AGW.REQ&amp;connectionFactory=clientChannel(WIP.SVRCONN)clientConnection(<customerIP1>(1414), <customerIP2>(1414))&amp;initialContextFactory=com.ibm.mq.jms.Nojndi&amp;replyDestination=QP.ABBSVC.WF1AGW.RESP&amp;timeToLive=30000&amp;persistence=1

The customer requires us to use IBM MQ transport, but the wsdl does not contain any MQ configuration, only HTTP. The URL used was received from the customers server side config.

JMS and IBM MQ is new to me, and I haven't completely understood the concept yet. I was hoping to get some assistance in getting started here.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Sep 29, 2017 5:04 am    Post subject: Reply with quote

Grand High Poobah

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

It looks like you have all the connection details for the connection factory: channel, hostname, port. The error text suggests that you also need to name the QCF (even though this is a nojndi qcf?)
_________________
MQ & Broker admin


Last edited by fjb_saper on Fri Sep 29, 2017 5:06 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri Sep 29, 2017 5:17 am    Post subject: Reply with quote

Grand High Poobah

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

Have you looked at the verifier and samples in <mqinstall>\tools\soap\samples\java ?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bbcno
PostPosted: Fri Sep 29, 2017 6:08 am    Post subject: Reply with quote

Newbie

Joined: 29 Sep 2017
Posts: 6

Yes I've looked at the examples, but I'm a little confused:
Do I need a server running locally? The samples have both client and server on the same machine.

But in my case, since the endpoint is external, isn't it enough to just generate the classes from wsdl using Axis and set the correct endpoint URL in order to call the web service?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Sep 29, 2017 7:30 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

<edited to remove misreading. wait for follow up>

You don't need a server running on the same machine as your jms code.

It's probably better if you don't, it will allow you to test your code in a way that is similar to talking to your customer.

I'm not really sure where Axis comes in, but that's just because java webstuff is not my area of expertise.

You should review the info in the MQ Knowledge center on using jMS with MQ.

You may have to create an MQJmsDestionation instead of a plain JMS Destination... but it's been a while since I've looked at that stuff too.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
bbcno
PostPosted: Wed Oct 04, 2017 6:12 am    Post subject: Reply with quote

Newbie

Joined: 29 Sep 2017
Posts: 6

I have added

Code:
<transport name="jms" pivot="java:com.ibm.mq.soap.transport.jms.WMQSender"/>


to client-config.wsdd.

The error is now:

Quote:
Required Option connectionFactory missing from MQ URL. MQCC_FAILED(2) MQRC_SOAP_URL_ERROR(2212).
at com.ibm.mq.soap.transport.jms.WMQSOAPException.getSOAPException(Unknown Source)
at com.ibm.mq.soap.transport.jms.WMQAddress.validate(Unknown Source)
at com.ibm.mq.soap.transport.jms.WMQAddress.setWmqURI(Unknown Source)
at com.ibm.mq.soap.transport.jms.WMQSender.invoke(Unknown Source)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)


It seems I got one step closer since the ibm mq classes now are involved in the call. But it still complains about the connectionFactory. I don't understand why since it is there in the URL. I've also tried the URL used at the sample documentation https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q033020_.htm

But the error occurs regardless of what I put in the URL.
Back to top
View user's profile Send private message
bbcno
PostPosted: Thu Oct 05, 2017 12:27 am    Post subject: Reply with quote

Newbie

Joined: 29 Sep 2017
Posts: 6

In the URL I needed to replace the &amp; with & and remove the ports. Now it seems to work!
Back to top
View user's profile Send private message
bbcno
PostPosted: Thu Oct 05, 2017 6:21 am    Post subject: Reply with quote

Newbie

Joined: 29 Sep 2017
Posts: 6

The cause of the error was actually the ORDER of the added external libraries.

The jars in MQ_INSTALLATION_PATH/java/lib must be added BEFORE the jars in MQ_INSTALLATION_PATH/java/lib/soap.
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 » IBM MQ Java / JMS » Java SOAP with JMS IBM MQ transport - noCFName
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.