Java - Spring Web Service : cannot find the file

myjobiscoding
myjobiscoding used Ask the Experts™
on
This is my first program to  use Spring. My program is to make a Web Service call over JMS. I have learnt from the following link

http://static.springsource.org/spring-ws/site/reference/html/client.html

but I have encountered the following error and a question myself
I have got the following error:
1. parsing XML document from class path resource [try.xml]; nested exception is java.io.FileNotFoundException:
   class path resource [try.xml] cannot be opened because it does not exist
2. http://localhost:8080/AnotherWebService <== Is this a Web Service Call. For example, I want to make web service call "EnrolStudent" over jms
   Should I put http://xmlns.oracle.com/ui/studentmanagement/EnrolStudent

===========================================================================
public class WebServiceClient  {
    private static final String MESSAGE = "<message xmlns=\"http://tempuri.org\">Hello Web Service World</message>";
    private final WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
    private static final void loadConfig() {
          ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("try.xml");
          context.refresh();
    }
    public void setDefaultUri(String defaultUri) {
        webServiceTemplate.setDefaultUri(defaultUri);
    }
    // send to an explicit URI
    public void customSendAndReceive(String requestXML) {
          StreamSource source = new StreamSource(new StringReader(requestXML));
        StreamResult result = new StreamResult(System.out);
        webServiceTemplate.sendSourceAndReceiveToResult("http://localhost:8080/AnotherWebService", source, result);
    }
   
    public static void main(String[] args) {              
          WebServiceClient webServiceClient = new WebServiceClient();
          loadConfig();
        try {
              webServiceClient.customSendAndReceive(MESSAGE);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }  
}
=========================================================================
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
1. The error is pretty obvious, it can't find your try.xml file. This must be placed in the classpath, and the way that you have it at the moment, it should be in the root of your classpath. That's about all I can help you with there. Post a recursive directory listing so that I can help tell you where it should be.

2. In the Spring WS reference page, there is a section 6.2.1.1.2. JMS transport that shows you the format of the URI that you need for JMS transports.


Also, you still need to learn a bit more about Spring. Go back to the code that I gave you in the previous question. The above isn't really doing anything useful, there are a number of issues with it. Go back and start with what I gave you before, you will be much closer to where you need to be. Add in the 2 lines where you create the StreamSource and StreamResult, they are correct, at least for testing purposes.

Author

Commented:
Thanks again.  mccarl
Yes. I do find the try.xml file now.

I change the try.xml file to specify using JMS transport

===
<beans>
    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
   
    <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="vm://localhost?broker.persistent=false"/>
    </bean>

    <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
        <constructor-arg ref="messageFactory"/>
        <property name="messageSender">
            <bean class="org.springframework.ws.transport.jms.JmsMessageSender">
                <property name="connectionFactory" ref="connectionFactory"/>
            </bean>
        </property>
        <property name="defaultUri" value="jms:RequestQueue?deliveryMode=NON_PERSISTENT"/>
    </bean>
</beans>

==========================================================================
I have the following information I used them to test for sending a message to the queue. it works. Buit I dont know how to add to the Spring try.xml
Also, Spring doesn't look like using WSDL. it seems using URI only. That's why I dont understand

QCF_NAME = au.com.iem.ngbcom.sop.oss
SOP_QUEUE_NAME = javax.jms.QueueConnectionFactory
INITIAL_CONTEXT_FACTORY weblogic.jndi.WLInitialContextFactory
PROVIDER_URL = fa://uni.in.iem.com.au:6508
SECURITY_PRINCIPAL = "xxxxx"
SECURITY_CREDENTIALS = "password"
WSDL_LOCATION = "http://uni.in.iem.com:6508/osm/uniapi?WSDL"

Look like Spring WebSeviceTemplate does alot of work.
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
Ok, that example was for connecting to an ActiveMQ JMS server, but looking at your properties, you need to connect to a Weblogic JMS server.

Also, looking at the info that you just gave, there may be some things wrong with a few values...

QCF_NAME - this may be right but it looks more like a package or path, usually Queue Connection Factory Names are just something like "ConnectionFactory" or similar. Anyway, look out for error saying that the JNDI lookup failed, this may be the cause.

SOP_QUEUE_NAME - this definitely looks wrong, this is a class name. I would expect something like "WebServiceQueue" or "oracle/communications/emiordermanagement/WebServiceQueu" based on the WSDL that you gave in the other question.

PROVIDER_URL - may or may not be correct. The thing that I am a little unsure about is the fa://... part, most Weblogic URL's that I have seen are t3://... but I don't have much experience with Weblogic so I don't know for sure.

Anyway, you should know these values as you said that you have had a working program sending test messages to the queue.

Ok, so with all the above out of the way, this should be closer to what you need in the Spring context xml file...
<beans>
    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
   
    <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiEnvironment">
            <props>
                <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                <prop key="java.naming.provider.url">fa://uni.in.iem.com.au:6508</prop>
                <prop key="java.naming.security.principal">xxxxx</prop>
                <prop key="java.naming.security.credentials">password</prop>
            </props>
        </property>
        <property name="jndiName" value="QCF_NAME"/>
    </bean>

    <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
        <constructor-arg ref="messageFactory"/>
        <property name="messageSender">
            <bean class="org.springframework.ws.transport.jms.JmsMessageSender">
                <property name="connectionFactory" ref="connectionFactory"/>
            </bean>
        </property>
        <property name="defaultUri" value="jms:SOP_QUEUE_NAME"/>
    </bean>
</beans>

Open in new window

(Note: in the above substitute QCF_NAME and SOP_QUEUE_NAME for their real values, once you work out what they really should be)

The "JndiObjectFactoryBean" class from Spring help out a lot by looking up an object in a JNDI service. The "jndiEnvironment" property tell Spring where to connect to JNDI to do the lookup, and "jndiName" is the name that is looked up in JNDI to return the object. The object returned is an instance of the javax.jms.ConnectionFactory interface, that creates connections to you Weblogic JMS server and this is what the WebServiceTemplate uses to get a connection which it then uses to send the message. Which queue in that JMS server that the message gets sent to, is configured in the WebServiceTemplate itself, via the "defaultUri" property.


> Also, Spring doesn't look like using WSDL

No, it doesn't. There are some other tools/libraries that can make use of the WSDL but even those (as far as I know) can't use it if you are using JMS as the transport. And very few, I think, actually use a WSDL at runtime to know where/how to communicate; usually it is just used (as you have in JDeveloper) to create classes and stubs, etc at development time.
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Author

Commented:
Yes. that is weblogic. I can see how good you are. You point out straight away as I have to change something not to expose my organsiation details in this site.

I have change and try to make a first run. I got the following errors

           Cannot find the declaration of element 'beans'

So I change to

<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
   
    <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiEnvironment">
            <props>
                <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                <prop key="java.naming.provider.url">fa://uni.in.iem.com.au:6508</prop>
                <prop key="java.naming.security.principal">xxxxx</prop>
                <prop key="java.naming.security.credentials">password</prop>
            </props>
        </property>
        <property name="jndiName" value="au.com.iem.ngbcom.sop.oss"/>
    </bean>

    <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
        <constructor-arg ref="messageFactory"/>
        <property name="messageSender">
            <bean class="org.springframework.ws.transport.jms.JmsMessageSender">
                <property name="connectionFactory" ref="connectionFactory"/>
            </bean>
        </property>
        <property name="defaultUri" value="jms:QueueConnectionFactory"/>
    </bean>
</beans>


=============================================================
But I still got errors saying
but Cannot find the declaration of element 'beans'

Please advise ?? do I miss out any jar files or xsd path not right

Author

Commented:
Thought
"DefaultUri is for the location of the web service. Please correct me..

<property name="defaultUri" value="http://example.com/WebService"/>
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
> But I still got errors saying    Cannot find the declaration of element 'beans'

You may have found an old version of docs that had an error (it since should have been corrected, at least somewhere) in the xsi:schemaLocation attribute.

Change this...
xsi:schemaLocation="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"

Open in new window

to this...
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"

Open in new window

(Note: look carefully, it's easy to miss the difference)


> "DefaultUri is for the location of the web service. Please correct me..

"defaultUri" is the location of the Web Service. However, the web service you are trying to connect to, is located in two places. One via HTTP and one via JMS. Since you want the one via JMS, you need to use the JMS uri and the details of that are given in the Javadoc. This URI isn't going to be anything that is in the WSDL (not directly anyway) as this URI format is particular to Springs WebServiceTemplate/JmsMessageSender. Some other library may use another format, and so the WSDL isn't going to be able to cater for all those differences. However, you do use the information in the WSDL to construct the URI, as I have shown above.

Author

Commented:
wow.. get closing.. it can find a try.xml and create

DefaultUri. I do understand that I need to refer to jmi
below is JMI Uri information I found from WSDL file.

<s1:port binding="s2:OrderManagementWebServicePortBindingJms" name="OrderManagementWebServiceJMSPort">
  <s3:address location="jms://12.111.222.3:1232/osm/wsapi?URI=oracle/StudentManagement/WebServiceQueue" />
</s1:port>

So I change to

<property name="defaultUri" value="oracle/StudentManagement/WebServiceQueue"/>
 

======================
Wow, getting close I think even I got some errors:

Error creating bean with name 'webServiceTemplate' defined in class path resource [appContext.xml]:
Cannot create inner bean 'org.springframework.ws.transport.jms.JmsMessageSender#53fb57' of type [org.springframework.ws.transport.jms.JmsMessageSender]
while setting bean property 'messageSender';

The above error I think it is caused by the following line

// send to an explicit URI
webServiceTemplate.sendSourceAndReceiveToResult("http://xmlns.oracle.com/uni/student/StudentManagement/StudentEnrolment", source, result);

"http://xmlns.oracle.com/uni/student/StudentManagement/StudentEnrolment" <== make a web service call method "StudentEnrolment"


Refer to Spring document, I copy the following lines and change the Webservice name

Below is my Web Service call - StudentEnrolment
http://xmlns.oracle.com/uni/student/StudentManagement/StudentEnrolment"

==============================
Please advice. i think it is getting close..

Author

Commented:
found other error messages. Think ther error is information i put in the try.xml

Cannot convert value of type [weblogic.jms.common.DestinationImpl] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
> So I change to <property name="defaultUri" value="oracle/StudentManagement/WebServiceQueue"/>

Yes, I think that could well be correct, however it isn't your problem just yet as you aren't getting that far.


> The above error I think it is caused by the following line    // send to an explicit URI

NO, it isn't and you shouldn't use the method that sends to an explicit URI as you are setting the "defaultURI" in your spring context xml file. Just use...
webServiceTemplate.sendSourceAndReceiveToResult(source, result);

Open in new window

> Cannot convert value of type [weblogic.jms.common.DestinationImpl] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found

This will be because you have a wrong value for "jndiName" in the configuration for the connectionFactory. Why? Well, firstly, the rest of the config (in the "jndiEnvironment" property) must be correct because you are connecting to Weblogic's JNDI service. However, the jndiName that you are asking it to retrieve must be that of a Queue object in it's JNDI not the ConnectionFactory object. All you should need to do is change that value of "jndiName" to something else, DON'T CHANGE ANYTHING ELSE YET JUST GET THIS PART RIGHT FIRST!!!

What that error is basically saying is that I got an object from JNDI and it is an instance of "weblogic.jms.common.DestinationImpl" and that is now the "connectionFactory" bean. But then in the config for JmsMessageSender you are trying to assign that "weblogic.jms.common.DestinationImpl" object to a property of JmsMessageSender that is of type "javax.jms.ConnectionFactory" and obviously they are not compatible.

Author

Commented:
Wow.. fixed the above error by changing jndiName to the below

<property name="jndiName" value="weblogic.jms.ConnectionFactory" />

Now I got the following error message:
Could not write message to OutputStream: Error attempting to save SOAPPart. Error attempting to save SOAPPart. java.io.IOException: java.net.UnknownHostException: xmlns.oracle.com



Could not write message to OutputStream: Error attempting to save SOAPPart.

My question is - That must be in a SOAP message format, isn't it?

Below is my message I want to send over JMS queue
private static final String MESSAGE =
      "Hello Web Service World";

StreamSource source = new StreamSource(new StringReader(MESSAGE ));
 StreamResult result = new StreamResult(System.out);
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
Post your current code and xml file.

Author

Commented:
Many thanks for pointing the problem.
Below is my xml file
=======================================================================
<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
     
    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
    <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiName" value="weblogic.jms.ConnectionFactory" />
        <property name="jndiEnvironment">
            <props>
                <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                <prop key="java.naming.provider.url">t3://vsm.in.vcui.com:7002</prop>
                <prop key="java.naming.security.principal">user</prop>
                <prop key="java.naming.security.credentials">password</prop>
            </props>
        </property>
    </bean>
   
    <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
        <constructor-arg ref="messageFactory"/>
        <property name="messageSender">
            <bean class="org.springframework.ws.transport.jms.JmsMessageSender">
                <property name="connectionFactory" ref="connectionFactory"/>
            </bean>
        </property>
        <property name="defaultUri" value="oracle/studentmanagement/WebServiceQueue"/>
    </bean>
</beans>
=======================================================================
Web Service Client program

public void webServiceCall(String enrolDetails) {
      ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("try.xml");
      context.refresh();
      StreamSource source = new StreamSource(new StringReader(enrolDetails));
      StreamResult result = new StreamResult(System.out);
      webServiceTemplate.sendSourceAndReceiveToResult(source, result);
}
=======================================================================

Question:

My question here is where I should specify the web service method. In this case, "StudentEnrolment" is I need to invoke in Web Service Call. In Spring, it does not ask for the SOPAction... I dont know why.
========================================================================

Author

Commented:
Hi mccarl,

Please advise me for this.

I got the following error "URI must not be empty" after I removed the explicit URI as I am setting  the "defaultURI" in your spring context xml file.

See below
webServiceTemplate.sendSourceAndReceiveToResult(source, result);

When I run, I got an error stating that
'uri' must not be empty"

Please advise
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
Again, I will ask, can you post the FULL code, don't leave lines just because you think that they might not be interesting or in context, everything is in context. Just cut and paste the WHOLE java file (If there is anything that you are worried about posting, eg. company IP, hostnames, IP address, etc, then replace them by a comment saying that you did that but DO try and only replace the minimum number of characters to protect such things and DON'T delete or leave out entire lines of code). Everything is important!!

Author

Commented:
Thankyou mccarl.

Below is my whole program including AppContext.xml and error message. url is empty..
================================================================================
AppContext.xml
==============
<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
     
    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
    <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
        <!--
          in my JMS Sender program, it does user javax.jms.QueueConnectionFactory so i change it instead of using
            weblogic on            
            <property name="jndiName" value="weblogic.jms.ConnectionFactory" />
            -->
            <property name="jndiName" value="javax.jms.QueueConnectionFactory" />
        <property name="jndiEnvironment">
            <props>
                <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                        <!--
                        provider.url - given my adminstrator. it works in my JMS Sender program
                        -->
                <prop key="java.naming.provider.url">t3://my.weblogic.com:7002</prop>  
                <prop key="java.naming.security.principal">admin</prop>
                <prop key="java.naming.security.credentials">adminpassword</prop>
            </props>
        </property>
    </bean>
   
    <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
        <constructor-arg ref="messageFactory"/>
        <property name="messageSender">
            <bean class="org.springframework.ws.transport.jms.JmsMessageSender">
                <property name="connectionFactory" ref="connectionFactory"/>
            </bean>
        </property>
       
        <property name="defaultUri" value="oracle/communications/studentmanagement/WebServiceQueue"/>
    </bean>
</beans>

================================================================================WebServiceClient.java
=============================================================================

package com.student.ws;
import java.io.StringReader;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.ws.client.core.WebServiceTemplate;

public class WebServiceClient {
          private static final String MESSAGE = "My test message";
          private final WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
          
            private static final void init() {
                ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("appContext.xml");
                context.refresh();
          }

          public void invokeWebServiceCallOverJMS(String messageXML) {
                StreamSource source = new StreamSource(new StringReader(messageXML));
              StreamResult result = new StreamResult(System.out);
              webServiceTemplate.sendSourceAndReceiveToResult(source, result);
          }
          
          public static void main(String[] args) {
            System.out.println("WebServiceClient[start]");          
                WebServiceClient webServiceClient = new WebServiceClient();
                init();          
              try {
                    webServiceClient.invokeWebServiceCallOverJMS(MESSAGE);
              } catch (Exception ex) {
                  ex.printStackTrace();
              }
          }  

}
==================================================================================================================
I got the followng errors
log4j:WARN No appenders could be found for logger (org.springframework.ws.soap.saaj.SaajSoapMessageFactory).
log4j:WARN Please initialize the log4j system properly.
WebServiceClient.invokeWebServiceCallOverJMS[start]
java.lang.IllegalArgumentException: 'uri' must not be empty
      at org.springframework.util.Assert.hasLength(Assert.java:136)
      at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:457)
      at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:420)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:366)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:357)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:347)
      at com.osm.ws.WebServiceClient.invokeWebServiceCallOverJMS(WebServiceClient.java:25)
      at com.osm.ws.WebServiceClient.main(WebServiceClient.java:37)
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
Ok, as I thought... You still haven't used the code that I sent previously (one very line in particular)


> private final WebServiceTemplate webServiceTemplate = new WebServiceTemplate();

creates a NEW WebServiceTemplate, totally unrelated to the one that you define in the AppContext.xml, and hence has none of the settings that you have defined there, including defaultUri among others.



SO...

After the context.refresh() call, you need to "get" your webServiceTemplate from the context. Add the following line after context.refresh()...

webServiceTemplate = context.getBean("webServiceTemplate", WebServiceTemplate.class());

(And make the necessary changes to the declaration of webServiceTemplate at the top of your class, so that the bean that you "get" above is the one that is used in the line...  webServiceTemplate.sendSourceAndReceiveToResult(source, result);

Author

Commented:
Hi,

I am not sure what you mean

make the necessary changes to the declaration of webServiceTemplate at the top of your class,

I can't find any example while googling for a while.

Please give me some example. Thanks.

=============================================================================
private final WebServiceTemplate webServiceTemplate = new WebServiceTemplate();

private static final void loadConfig() {
                ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("appContext.xml");
                context.refresh();
                webServiceTemplate = context.getBean("webServiceTemplate", WebServiceTemplate.class());
          }
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
No need to google, just basic Java.

Change...

   private final WebServiceTemplate webServiceTemplate = new WebServiceTemplate();

to...

   private static WebServiceTemplate webServiceTemplate;



(This is just one way, you may want to do it differently later, depending on how you end up structuring you class(es) after you get this test working.)

Author

Commented:
I change to
=========
public class WebServiceClient {
          private static final String MESSAGE = "Testing message";
          public static  WebServiceTemplate webServiceTemplate;
            
          private static final void loadConfig() {
                ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("appContext.xml");
                context.refresh();
                webServiceTemplate = (WebServiceTemplate)context.getBean("webServiceTemplate");
          }
          public void invokeWebServiceCallOverJMS(String requestXML) {
                loadConfig();
                StreamSource source = new StreamSource(new StringReader(requestXML));
              StreamResult result = new StreamResult(System.out);
              webServiceTemplate.sendSourceAndReceiveToResult(source, result);
          }
}
=========
I got the following errors
java.lang.NullPointerException
      at org.springframework.ws.transport.jms.JmsMessageSender.supports(JmsMessageSender.java:150)
      at org.springframework.ws.client.support.WebServiceAccessor.createConnection(WebServiceAccessor.java:106)
      at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:461)
      at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:420)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:366)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:357)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:347)
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
Ok, Spring's JmsMessageSender could probably do some better error checking in this case, to at least give a more descriptive error message, but I am pretty sure this will be due to the value of 'defaultUri'.

In your XML, change ...

   <property name="defaultUri" value="oracle/communications/studentmanagement/WebServiceQueue"/>

to...

   <property name="defaultUri" value="jms:oracle/communications/studentmanagement/WebServiceQueue"/>



If you look at the source code for that line that is throwing the NullPointerException, you would see this...

   return uri.getScheme().equals(JmsTransportConstants.JMS_URI_SCHEME);

and I am 99% sure that the NPE would be because uri.getScheme() is returning null (because of that missing 'jms:' in the defaultUri), and then when it tries to call the .equals() method, the NPE is thrown.

Author

Commented:
I do think this is caused by defaultURI.

I am  NOT sure what I need to put in defaultURI.
Ok the one I get it is from the given WSDL file. like below:

<s1:service name="StudentManagementService">
 <s1:port binding="s2:OrderManagementWebServicePortBindingJms" name="OrderManagementWebServiceJMSPort">
      <s3:address location="jms://111.222.56.3:7002/osm/wsapi?URI=oracle/communications/studentmanagement/WebServiceQueue" />
  </s1:port>
</s1:service>
====================================================================
I also  log on the Weblogic server and found the Queue information

JNDI Name : /com/student/management/enrolment/oss   <== should i use this one as a defaultURI or use the one specified in WSDL file like below

<s1:port binding="s2:OrderManagementWebServicePortBindingJms" name="OrderManagementWebServiceJMSPort">
      <s3:address location="jms://192.168.56.3:7002/osm/wsapi?URI=oracle/communications/studentmanagement/WebServiceQueue" />  
  </s1:port>
 
please advise.

Author

Commented:
ok. I change to

   <property name="defaultUri" value="jms:oracle/communications/studentmanagement/WebServiceQueue"/>

and run, I got different errors:
Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Caused by: java.lang.InternalError: error initializing kernel caused by: java.lang.AssertionError: Duplicate initialization of WorkManager

I am sorry I keep asking you questions as you are the only one willing to help me.
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
Was there any more detailed information for the error, eg. a full stack trace like you have posted previously?

Author

Commented:
May i email you the complete program. the actual appContext.xml as I change because I can't expose company host name information
===
Below is a whole error messages
after i change the defaultURL by adding jms:
   <property name="defaultUri" value="jms:oracle/communications/studentmanagement/WebServiceQueue"/>


=====================================================================
Exception in thread "main" java.lang.AssertionError: java.lang.reflect.InvocationTargetException
      at weblogic.kernel.KernelInitializer.initializeWebLogicKernel(KernelInitializer.java:45)
      at weblogic.timers.TimerManagerFactory.initialize(TimerManagerFactory.java:41)
      at weblogic.timers.TimerManagerFactory.getTimerManagerFactory(TimerManagerFactory.java:27)
      at weblogic.messaging.dispatcher.DispatcherWrapperState.getDefaultTimerManager(DispatcherWrapperState.java:579)
      at weblogic.messaging.dispatcher.DispatcherWrapperState.schedulePeerGone(DispatcherWrapperState.java:562)
      at weblogic.messaging.dispatcher.DispatcherWrapperState.triggerPeerGoneAndWait(DispatcherWrapperState.java:602)
      at weblogic.messaging.dispatcher.DispatcherWrapperState.dispatchSyncTran(DispatcherWrapperState.java:349)
      at weblogic.messaging.dispatcher.DispatcherWrapperState.dispatchSyncNoTran(DispatcherWrapperState.java:386)
      at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:59)
      at weblogic.jms.client.JMSSession.createDestination(JMSSession.java:3133)
      at weblogic.jms.client.JMSSession.createQueue(JMSSession.java:2530)
      at weblogic.jms.client.WLSessionImpl.createQueue(WLSessionImpl.java:938)
      at org.springframework.jms.support.destination.DynamicDestinationResolver.resolveQueue(DynamicDestinationResolver.java:101)
      at org.springframework.jms.support.destination.DynamicDestinationResolver.resolveDestinationName(DynamicDestinationResolver.java:66)
      at org.springframework.jms.support.destination.JmsDestinationAccessor.resolveDestinationName(JmsDestinationAccessor.java:100)
      at org.springframework.ws.transport.jms.JmsMessageSender.resolveRequestDestination(JmsMessageSender.java:154)
      at org.springframework.ws.transport.jms.JmsMessageSender.createConnection(JmsMessageSender.java:130)
      at org.springframework.ws.client.support.WebServiceAccessor.createConnection(WebServiceAccessor.java:107)
      at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:461)
      at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:420)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:366)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:357)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:347)
      at com.osm.ws.WebServiceClient.invokeWebServiceCallOverJMS(WebServiceClient.java:26)
      at com.osm.ws.WebServiceClient.main(WebServiceClient.java:38)
Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at weblogic.kernel.KernelInitializer.initializeWebLogicKernel(KernelInitializer.java:41)
      ... 24 more
Caused by: java.lang.InternalError: error initializing kernel caused by: java.lang.AssertionError: Duplicate initialization of WorkManager
      at weblogic.work.WorkManagerFactory.set(WorkManagerFactory.java:107)
      at weblogic.work.ExecuteQueueFactory.initialize(ExecuteQueueFactory.java:23)
      at weblogic.kernel.Kernel.initialize(Kernel.java:103)
      at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:64)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at weblogic.kernel.KernelInitializer.initializeWebLogicKernel(KernelInitializer.java:41)
      at weblogic.timers.TimerManagerFactory.initialize(TimerManagerFactory.java:41)
      at weblogic.timers.TimerManagerFactory.getTimerManagerFactory(TimerManagerFactory.java:27)
      at weblogic.messaging.dispatcher.DispatcherWrapperState.getDefaultTimerManager(DispatcherWrapperState.java:579)
      at weblogic.messaging.dispatcher.DispatcherWrapperState.schedulePeerGone(DispatcherWrapperState.java:562)
      at weblogic.messaging.dispatcher.DispatcherWrapperState.triggerPeerGoneAndWait(DispatcherWrapperState.java:602)
      at weblogic.messaging.dispatcher.DispatcherWrapperState.dispatchSyncTran(DispatcherWrapperState.java:349)
      at weblogic.messaging.dispatcher.DispatcherWrapperState.dispatchSyncNoTran(DispatcherWrapperState.java:386)
      at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:59)
      at weblogic.jms.client.JMSSession.createDestination(JMSSession.java:3133)
      at weblogic.jms.client.JMSSession.createQueue(JMSSession.java:2530)
      at weblogic.jms.client.WLSessionImpl.createQueue(WLSessionImpl.java:938)
      at org.springframework.jms.support.destination.DynamicDestinationResolver.resolveQueue(DynamicDestinationResolver.java:101)
      at org.springframework.jms.support.destination.DynamicDestinationResolver.resolveDestinationName(DynamicDestinationResolver.java:66)
      at org.springframework.jms.support.destination.JmsDestinationAccessor.resolveDestinationName(JmsDestinationAccessor.java:100)
      at org.springframework.ws.transport.jms.JmsMessageSender.resolveRequestDestination(JmsMessageSender.java:154)
      at org.springframework.ws.transport.jms.JmsMessageSender.createConnection(JmsMessageSender.java:130)
      at org.springframework.ws.client.support.WebServiceAccessor.createConnection(WebServiceAccessor.java:107)
      at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:461)
      at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:420)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:366)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:357)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:347)
      at com.osm.ws.WebServiceClient.invokeWebServiceCallOverJMS(WebServiceClient.java:26)
      at com.osm.ws.WebServiceClient.main(WebServiceClient.java:38)

      at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:66)
      ... 29 more

Author

Commented:
My JMS messageSender program works. It successfully sends the message to the nomiated queue in WebLogic. I am not sure this program helps to find out what the problem in my Spring WebService Client program
===
public class MessageSender {

         private static InitialContext ctx = null;
         private static QueueConnectionFactory queueConnectionFactory = null;
         private static QueueConnection qc = null;
         private static QueueSession qsess = null;
         private static Queue q = null;
         private static QueueSender qsndr = null;
         private static TextMessage message = null;
        
         public void sendMessage(String messageText) throws JMSException {
             Hashtable<String, String> properties = new Hashtable();
             properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
             properties.put(Context.PROVIDER_URL, "t3://in.myuni.com.au:7002");
             properties.put(Context.SECURITY_PRINCIPAL, "admin");
             properties.put(Context.SECURITY_CREDENTIALS, "dskdsk123");
            
             try {
                 ctx = new InitialContext(properties);
                 queueConnectionFactory = (QueueConnectionFactory)ctx.lookup("javax.jms.QueueConnectionFactory");
                 qc = queueConnectionFactory.createQueueConnection();
                 qsess = qc.createQueueSession(false, 0);
                 q = (Queue) ctx.lookup("au.com.myuni.ngbcom.sop.oss");
                 qsndr = qsess.createSender(q);
                 message = qsess.createTextMessage();
                 message.setText(messageText);
                 System.out.println("Set text in TextMessage " + message.toString());
                 qsndr.send((Message) message);
             } catch (NamingException ne) {
                 ne.printStackTrace(System.err);
                 System.exit(0);
             } catch (JMSException jmse) {
                 jmse.printStackTrace(System.err);
                 System.exit(0);
             }
             ;
         }

         public static void main(String args[]) {
               MessageSender jmsSender = new MessageSender();
                  try {
                        jmsSender.sendMessage("text");
                  } catch (JMSException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                  }

         }

}
==========================================================
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
I have some ideas that might solve the issue, but limited time to write about them. I will be able to get back to you tomorrow morning, in the meantime, part of the issue may be due to class loading issues. Have a look at the following links, and try playing around with the weblogic .jar files that you are using in this project. And also try playing around with the order in which they are referenced. I don't know JDeveloper, but in Eclipse you can specify the order, and this may influence the result.


https://forums.oracle.com/forums/thread.jspa?messageID=10087861

https://forums.oracle.com/forums/thread.jspa?threadID=737584

http://programmingchronicles.blogspot.com.au/2012/01/have-you-ever-tried-to-invoke-secure_16.html

Author

Commented:
Many many thanks. I will look into it..I will spend whole night to try agin.
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
How did you go with those links? Any further?

The idea that I was thinking yesterday, is just that the main functional difference between the original code to send the test message and this new code to send the Web Service request, is the way that it obtains the actual Destination object that represents the Queue in Weblogic.

So try this updated AppContext.xml, you may need to just check the value of the JNDI values, this was a copy of the last one that you posted but with my changes...

<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
     
    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
    <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
        <property name="environment">
            <props>
                <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                        <!--
                        provider.url - given my adminstrator. it works in my JMS Sender program
                        -->
                <prop key="java.naming.provider.url">t3://my.weblogic.com:7002</prop>  
                <prop key="java.naming.security.principal">admin</prop>
                <prop key="java.naming.security.credentials">adminpassword</prop>
            </props>
        </property>
    </bean>
    <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
        <!--
          in my JMS Sender program, it does user javax.jms.QueueConnectionFactory so i change it instead of using
            weblogic on            
            <property name="jndiName" value="weblogic.jms.ConnectionFactory" />
            -->
            <property name="jndiName" value="javax.jms.QueueConnectionFactory" />
        <property name="jndiTemplate" ref="jndiTemplate"/>
    </bean>
   
    <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
        <constructor-arg ref="messageFactory"/>
        <property name="messageSender">
            <bean class="org.springframework.ws.transport.jms.JmsMessageSender">
                <property name="connectionFactory" ref="connectionFactory"/>
                <property name="destinationResolver">
                   <bean class="org.springframework.jms.support.destination.JndiDestinationResolver">
                      <property name="jndiTemplate" ref="jndiTemplate"/>
                   </bean>
                </property>
            </bean>
        </property>
       
        <!--
        <property name="defaultUri" value="oracle/communications/studentmanagement/WebServiceQueue"/>
        -->
        <property name="defaultUri" value="jms:au.com.myuni.ngbcom.sop.oss"/>
    </bean>
</beans>

Open in new window

You will also see that I changed the defaultUri property. The part after jms: is the Queue that you were looking up in your other test program, so maybe this is what it needs to be (I am only guessing at this because this is an environment thing, ie. it depends on how your weblogic server is configured).

The above changes makes your program lookup BOTH the connection factory AND the destination queue from Weblogic's JNDI provider. (Before it was only looking up the connection factory). And it does this using the shared set of properties, which is what the jndiTemplate object is doing, it holds these shared properties so that multiple services can use them (the JndiObjectFactoryBean and the JndiDestinationResolver)


Once these changes are done, then there shouldn't really be too much difference between your test message sender and this code. The only other differences are in the libraries used. So hence why in my previous message I mentioned about the order of specifying JAR's in the classpath.

See how you go with all of that anyway, and let us know...

Author

Commented:
Morning mccarl.

I use the following as a refer guide and try, but no luck. still the same. I am using Eclipse as well. I try to change the order of the jar files, but still the same.

https://forums.oracle.com/forums/thread.jspa?messageID=10087861
https://forums.oracle.com/forums/thread.jspa?threadID=737584
http://programmingchronicles.blogspot.com.au/2012/01/have-you-ever-tried-to-invoke-

Below is the jar in order
spring-ws-1.5.2.jar
spring-ws-core-1.5.2.jar
spring-ws-core-2.1.0.RC1.jar
spring-ws-security-2.1.0.RC1.jar
spring-ws-support-2.1.0.RC1.jar
spring-xml-2.1.0.RC1.jar
spring.jar
wlclient.jar
wlfullclient.jar
weblogic.jar
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
Did you try with the 3 weblogic jars at the very top of the order. As I said, I haven't used weblogic but with my expereince with jBoss, it is very picky about the order that it gets loaded and it needs to be the first jar's loaded.

Try that and try the other change that I posted above.

Author

Commented:
THanks. using your sample appContext.xml
and change the defaultURI that is the one I am using for my jms send program and change the order of my jar file I put weblogic.jar at the bottom of the order

<property name="defaultUri" value="jms:au/com/myuni/ngbcom/sop/oss"/>

now the program can now talk to the host because if i put the invalid dfaultURI, it returns saying "Host not found".
However, when i run using the above URI, it returns different errors, saying "Content is not allowed in prolog."

[Fatal Error] :1:1: Content is not allowed in prolog.
ERROR:  'Content is not allowed in prolog.'
org.springframework.ws.client.WebServiceTransformerException: Transformation error: org.xml.sax.SAXParseException: Content is not allowed in prolog.; nested exception is javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
      at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:535)
      at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:465)
      at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:420)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:366)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:357)
      at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:347)
      at com.osm.ws.WebServiceClient.invokeWebServiceCallOverJMS(WebServiceClient.java:26)
      at com.osm.ws.WebServiceClient.main(WebServiceClient.java:38)
Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
      at org.springframework.ws.client.core.WebServiceTemplate$4.doWithMessage(WebServiceTemplate.java:422)
      at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:498)
      ... 7 more
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(Unknown Source)
      ... 11 more


======================================================================
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
This is probably just because what you are trying to send is not valid XML...

> private static final String MESSAGE = "Testing message";

This eventually will have to be the correctly crafted SOAP using the messageFactory setup in the AppContext.xml but for now to just get one step closer, try just sending some valid XML...

private static final String MESSAGE = "<message>Testing</message>";

Author

Commented:
Many thanks. Definity one step close. now no error. it looks like it does connect the server, and doing something as it just doesn't return anything.

Thought the server is down, so i try to use my jms sender program, it does get through.

Do I have to set the timer for connection something? HOw do i debug for this?

log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
WebServiceClient.WsCallOverJMS[start]
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
This is about as far as I can help I think, because the rest is going to be all down to your environment. But the things that I can suggest are..

Double check the weblogic jms server that it is receiving a JMS message, and that the queue that it is receiving on, has some other process (ie. the actual Web service) consuming from that queue in order to process that request.
See if the web service itself generates logs so that you can see if the request is getting to it. At the moment, I would expect it to reject the request because it is not in the format that it expects. It's just the <message>Testing</message> but it probably needs to be something like <SturdentEnrolmentRequest>....</StudentEnrolmentRequest>. This you will get from that .xsd file that the .wsdl file "imports" (as I mentioned earlier)
You could try setting up a standalone JMS server (say something like ActiveMQ) and try to send your message there (you will need to modify your JNDI template properties and to setup up a jndi.properties file to work with ActiveMQ). With this you can get some idea as to exactly how the messages are sent over the JMS, such as if they are getting properly transformed into SOAP messages, and what JMS properties are being set. In particular the JMS-ReplyTo property.

Author

Commented:
Many thanks. mccarl
I understand that.

May I have a question, that Websevice call over JMS, i dont have to specify the web method I want to call. Why. DefaultURI is used to specify the jms queue destination.

If i make a web service call I need to call the method call "Enrolment' like below

Using below jar file order - it hangs up
- src
- wlfullclient.jar
- weblogic.jar
- wlclient.jar

Using below order - it returns errors
- src
- weblogic.jar
- wlfullclient.jar
- wlclient.jar      

change the other order it returns the following erros
Exception in thread "main" java.lang.NoSuchFieldError: VERSION_1033
      at weblogic.jms.common.DestinationImpl.getVersion(DestinationImpl.java:468)
      at weblogic.jms.common.DestinationImpl.writeDestinationImpl(DestinationImpl.java:532)
      at weblogic.jms.common.DestinationImpl.writeExternal(DestinationImpl.java:517)
IT Business Systems Analyst / Software Developer
Top Expert 2015
Commented:
> Websevice call over JMS, i dont have to specify the web method I want to call. Why?

Because you specify it in the actual request message. As you mentioned before, there is no where for SOAP Action but that is because SOAP Action is fairly particular to SOAP over HTTP (the more normal way of doing Web Services). However, using SOAP Action is only one way that a web service server can work out which method is being called. The other way is from the actual SOAP message body. If you were to look at most normal web service calls via HTTP you would find the the main element inside SOAP body is the method name and is the same as a SOAP Action header.

This is why I made one of the points above, is that until you send an actual, correctly formatted request, the web service may be ignoring it because it would be an unknown method call.


As for your other error, I wouldn't have a chance knowing what is happening. You say before that it is working but now you say it either hangs or throws an error? But I don't know what you have changed to make it do that. Again it looks weblogic specific errors so I can't really help. You could try googling the error messages to see if others have stumbled across similar issues.


As I said earlier, SOAP and WS is fairly advanced stuff, and JMS is fairly advanced stuff.... Those two points and the fact that SOAP over JMS is quite rare means that this was always going to be hard road for you!!

Author

Commented:
Many many thanks
I hvae been learning alot since your help.
I would better close this questions and give you full credit for it.
I will raise another question about web service. hopefully you can help me as well.
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
I am glad that you are getting something out of this and are learning stuff.

You may be interested to know that last night, I was able to get a mock up of a Spring WS client talking via JMS to a Spring WS web service, and it all worked fairly smoothly. So it is definitely possible.

The whole idea of SOAP and Web Services were to provide an interoperable way to invoke remote methods, etc. Unfortunately, I think that the goal of interoperability has not fully been realised. SOAP over HTTP is pretty good these days, just because the sheer volume of people using it, and therefore standards have been developed and help to reach that interoperability goal. SOAP over JMS however, is not used so much and so there are still issues arising from different implementations going in slightly different directions.

There is still hope however...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial