SOAP over JMS
by tanmay pradhan
Hi,
I am trying to define a web service with SOAP over JMS. Went through the
jbossws user guide.
(
http://jbossws.jboss.org/mediawiki/index.php?title=JAX-WS_User_Guide#JMS_...
)
However the following line in the wsdl example was not clear to me.
<soap:address
location='jms://queue/RequestQueue?replyToName=queue/ResponseQueue'/>
Is 'replyToName' a key word which is used to specify the response queue
name?
or is there other way to specify the request and reponse queue for a web
service in the wsdl file?
Could anybody point me to some good examples for SOAP over JMS?
The versions I am using are:
-----------------------------------------
JBoss AS 4.2.3.GA
jbossws-3.0.1-native-2.0.4.GA
jboss-messaging-1.4.2.GA (yes I am using JBoss Messaging instead of
JBossMQ).
Thanks in advance for the help.
regards,
Tanmay
<binding name='JMSBinding' type='tns:OrganizationJMSEndpoint'>
<soap:binding style='rpc'
transport='http://www.example.org/2006/06/soap/bindings/JMS/'/>
<operation name='getContactInfo'>
<soap:operation soapAction=''/>
<input>
<soap:body
namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
</input>
<output>
<soap:body
namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
</output>
</operation>
</binding>
<service name='OrganizationJMSEndpointService'>
<port binding='tns:JMSBinding' name='JMSEndpointPort'>
<soap:address
location='jms://queue/RequestQueue?replyToName=queue/ResponseQueue'/>
</port>
</service>
15 years, 9 months
[JBossWS] - Error calling external webservice from JBOSS ESB action
by ayan13s
We are facing issues in external web service call from esb action. Our web service client works perfectly when we call it from a standalone java program. But it throws NullPointerException when we try calling it from ESB action. We compared the request being passed to the service and found out the following.
Signature in the request is being sent as a binary security token, but webservice expects subject key identifier.
Our standard-jaxws-client-config.xml has 'Standard WSSecurity Client' config(only) and in our jboss-wsse-client.xml file we have correct configuration() and we are setting it properly in the client using the following code.
URL securityURL = new File("jboss-wsse-client.xml").toURL();
((StubExt)impService).setSecurityConfig(securityURL.toExternalForm());
We are able to call the service successfully from standalone java app using same client. But when we try to invoke it from ESB, security token is being set incorrectly.
Request token reference when calling from jboss esb action -
<wsse:SecurityTokenReference wsu:Id='reference-3-1235384912204-31918910'><wsse:Reference URI='#token-2-1235384912204-24526361' ValueType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profil...'/></wsse:SecurityTokenReference>
Request as it should be -
<wsse:SecurityTokenReference wsu:Id='reference-2-1235384016982-12954112'><wsse:KeyIdentifier EncodingType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-secu...' ValueType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profil...'>IR8MMN/HOdj8ZC2YJWlBgsqYbLo=</wsse:KeyIdentifier></wsse:SecurityTokenReference>
Server side log -
15:51:04,328 ERROR [HandlerChainExecutor] Exception during handler processing
java.lang.NullPointerException
at org.jboss.ws.extensions.security.SecurityStore.validateCertificate(SecurityStore.java:501)
at org.jboss.ws.extensions.security.BinarySecurityTokenValidator.validateToken(BinarySecurityTokenValidator.java:47)
at org.jboss.ws.extensions.security.element.SecurityHeader.(SecurityHeader.java:78)
at org.jboss.ws.extensions.security.SecurityDecoder.decode(SecurityDecoder.java:175)
Any pointer would be of great help.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216099#4216099
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216099
15 years, 9 months
[JBossWS] - Re: Changing of soap:address location
by janekdb2
I was able to edit jbossws.beans/META-INF/jboss-beans.xml to change this
| <soap address location="http://127.0.0.1:11011/ws/t"/>
|
to the public facing url,
| <soap address location="http://www.mydomaine.com:80/ws/t"/>
|
Versions:
JBoss 4.2.2.GA
JBossWS Native 3.0.3.GA
libapache-mod-jk 1.2.18-3
apache 1.3.34-4.1
Changed part of jboss-beans.xml
| <!-- An abstraction of server configuration aspects. -->
| <bean name="WSServerConfig" class="org.jboss.wsf.stack.jbws.NativeServerConfig">
| <property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
|
| <!--
| The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
| element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
|
| If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless 'modifySOAPAddress' is true.
| If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
|
| If 'webServiceHost' is not set, JBossWS uses requesters protocol host when rewriting the <soap:address>.
| -->
| <!--
| <property name="webServiceHost">${jboss.bind.address}</property>
| -->
| <property name="modifySOAPAddress">true</property>
|
| <!--
| Set these properties to explicitly define the ports that will be used for rewriting the SOAP address.
| Otherwise the ports will be identified by querying the list of installed connectors.
| If multiple connectors are found the port of the first connector is used.
| <property name="webServiceSecurePort">8443</property>
| <property name="webServicePort">8080</property>
| -->
| <property name="webServicePort">80</property>
| </bean>
|
I commented out the webServiceHost property and uncommented the webServicePort port setting it to 80.
It would be better if JBossWS could also get the port from the requesters protocol port.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215755#4215755
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215755
15 years, 9 months
[JBossWS] - Re: Specify WS-Security Handler using JEE standards
by vdurbha
After trying various options, I finally figured out a way to write a completely generic client by removing the StubExt dependency. This was achieved by using the @HandlerChain annotation on the Service class. This may also work if we use the annotation on the SEI. And then I defined the handler in an xml and referred to it in the annotation as follows:
@HandlerChain(file="HelloWorldHandlerChain.xml")
But the server side endpoint still does not work if I use @HandlerChain annotation instead of @EndpointConfig to set the security handler. After digging into the source code of JBossWS and the log files for a few hours, I understood that for the WS-Security handler to work correctly, it has to be configured as a POST Handler type. When I used @HandlerChain annotation, it is configured as ENDPOINT Handler type. I was not able to find anyway to specify the type of handler in a standard way.
So for now, I'm guessing there is no escape from the @EndpointConfig proprietary annotation. Can someone please confirm the same? I would love to hear that I"m wrong with this because it is not a good idea to fill the source code with proprietary stuff. Doing this in a JBoss specific configuration file will be more cleaner as the code can then easily migrated to a different server without changes to source code.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215707#4215707
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215707
15 years, 9 months