[JBossWS] - How do you override soap:address location from WSDL at run t
by drblmb
Let's suppose you are running in production, and have a web service running at 1,000 different locations (IP Addresses). You don't want the overhead of having to go pull down the WSDL everytime you get the port, so you statically link with a .WSDL file stored locally. The problem, however, is that the soap:address location is statically defined in the WSDL. So - how does your JBossWS client change the endpoint address (NOT THE WSDL LOCATION) after getting the web service port?
Example: I have the same web service running at x.x.x.A and at x.x.x.B. So I get the port, and I want to send the same SOAP Request to both servers - why even get the port twice? Just send it to x.x.x.A (assuming that is where the WSDL is pointing to), and then change the endpoint address to x.x.x.B, and using the same port, call the same method again and it should go to x.x.x.B.
This is what we need to do - does anyone know how to do this? And yes, I know that you can override the WSDL location in the constructor - that isn't what I need to do here. I have been working on this for several days without success.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084173#4084173
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084173
18 years, 9 months
[JBossWS] - Custom exception/fault with JBoss & JWSDP
by bernhard_pauler
I'm struggling with this issue for a good while now - I hope somebody can help me...
I want to develop a web service interface with methods that throw a custom exception. I have been using the developerWorks article on exception handling (http://www.ibm.com/developerworks/webservices/library/ws-tip-jaxrpc.html) and samples provided by web service toolkits like Axis as guides for my own implementation.
But JBoss (4.2.1.GA) keeps printing the following messages while deploying my WAR file:
anonymous wrote : 19:25:26,031 WARN [JAXRPCMetaDataBuilder] Cannot obtain java type mapping for: {http://www.mycompany/MyService}>MyServiceFault
| 19:25:26,109 WARN [SchemaBindingBuilder] Type definition not found in schema: {http://www.mycompany.com/MyService}MyServiceFault
| 19:25:26,109 WARN [SchemaBindingBuilder] Cannot obtain type binding for: {http://www.mycompany.com/MyService}MyServiceFault
I start with a handwritten WSDL file (see below) and use the JWSDP tools (2.0) to generate the server-side artifacts and the JAX-RPC mapping file (as outlined in the book "JBoss at Work").
I tried the WSDL file of the faulthandling sample that comes with Apache Axis2 (1.3, bank.wsdl) and get the same messages.
Any ideas? Do I have to use the wstools that come with JBossWS to get this thing working?
Here is my WSDL file:
<?xml version="1.0" encoding="utf-8"?>
|
| <definitions name="MyService"
| xmlns ="http://schemas.xmlsoap.org/wsdl/"
| xmlns:xsd ="http://www.w3.org/2001/XMLSchema"
| xmlns:soap ="http://schemas.xmlsoap.org/wsdl/soap/"
| xmlns:mime ="http://schemas.xmlsoap.org/wsdl/mime/"
| xmlns:tns ="http://www.mycompany.com/MyService"
| targetNamespace="http://www.mycompany.com/MyService">
|
| <types>
| <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.mycompany.com/MyService">
| <element name="login">
| <complexType>
| <sequence>
| <element name="customerId" type="xsd:string"/>
| <element name="userId" type="xsd:string"/>
| <element name="password" type="xsd:string"/>
| </sequence>
| </complexType>
| </element>
| <element name="loginResponse">
| <complexType>
| <sequence>
| <element name="sessionId" type="xsd:int"/>
| </sequence>
| </complexType>
| </element>
| <element name="MyServiceFault">
| <complexType>
| <sequence>
| <element name="errorCode" type="xsd:string"/>
| <element name="errorMessage" type="xsd:string"/>
| </sequence>
| </complexType>
| </element>
| </schema>
| </types>
|
| <message name="loginRequest">
| <part name="parameters" element="tns:login"/>
| </message>
| <message name="loginResponse">
| <part name="result" element="tns:loginResponse"/>
| </message>
| <message name="MyServiceFaultMessage">
| <part name="fault" element="tns:MyServiceFault"/>
| </message>
|
| <portType name="MyServiceEndpoint">
| <operation name="login">
| <input message="tns:loginRequest"/>
| <output message="tns:loginResponse"/>
| <fault name="MyServiceFault" message="tns:MyServiceFaultMessage"/>
| </operation>
| </portType>
|
| <binding name="MyServiceEndpointBinding" type="tns:MyServiceEndpoint">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
| <operation name="login">
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| <fault name="MyServiceFault">
| <soap:fault name="MyServiceFault" use="literal"/>
| </fault>
| </operation>
| </binding>
|
| <service name="MyService">
| <port name="MyServiceEndpointPort" binding="tns:MyServiceEndpointBinding">
| <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
| </port>
| </service>
|
| </definitions>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084171#4084171
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084171
18 years, 9 months
[JBoss Messaging] - createConnection hangs
by bob_walker99
Hi,
I've been seeing this for a while and alsways put it down to classpath issues, but I'm quite an expert at which jboss client jars work and which don't, and what needs to go where, so I'm no longer convinced that this is the issue.
What's happening is that at seemingly random junctures, calls to createConnection stop working. they sit in this stack:
at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
| at jrockit/net/SocketNativeIO.socketRead(Ljava/io/FileDescriptor;[BIII)I(Unknown Source)
| at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.java)
| at java/net/SocketInputStream.read(SocketInputStream.java:129)
| at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
| at java/io/BufferedInputStream.read(BufferedInputStream.java:237)
| ^-- Holding lock: java/io/BufferedInputStream@0x403bf048[thin lock]
| at java/io/FilterInputStream.read(FilterInputStream.java:66)
| at org/jboss/remoting/transport/socket/MicroSocketClientInvoker.readVersion(MicroSocketClientInvoker.java:1000)
| at org/jboss/remoting/transport/socket/MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:574)
| at org/jboss/remoting/transport/bisocket/BisocketClientInvoker.transport(BisocketClientInvoker.java:413)
| at org/jboss/remoting/MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org/jboss/remoting/Client.invoke(Client.java:1634)
| at org/jboss/remoting/Client.invoke(Client.java:548)
| at org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDele gate.java:164)
| at org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext()Ljava/lang/Object;(ClientConnectionFactoryDelegate$createCon nectionDelegate_N3019492359065420858.java)
| at org/jboss/jms/client/container/StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:83)
| at org/jboss/aop/advice/org/jboss/jms/client/container/StateCreationAspect0.invoke(Lorg/jboss/aop/joinpoint/Invocation;)Ljava/lang/Object;(StateCreationAspect0.java)
| at org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext()Ljava/lang/Object;(ClientConnectionFactoryDelegate$createCon nectionDelegate_N3019492359065420858.java)
| at org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.createConnectionDelegate(Ljava/lang/String;Ljava/lang/String;I)Lorg/jboss/jms/delegate/CreateConnectionResult;(ClientC onnectionFactoryDelegate.java)
| at org/jboss/jms/client/JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
| at org/jboss/jms/client/JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
| at org/jboss/jms/client/JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
|
but never returns. This can happen without me changing anything, but once it happens it is unrecovereable. All future runs of the code do the same thing, restarting the client and the server has no effect. I'm using the latest 1.4.0CR2 jars withthe remoting update too.
I'm sorry I can't suggest what may be happening here, I'm at the end of my tether; if anyone at all can help I'd be eternally grateful. I'm having to explore other MQ providers because I can't get past the problems I'm having with JBoss Messaging and it's costing me too much time investigating.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084167#4084167
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084167
18 years, 9 months