[JBossWS] - Unable to load Provider: Failed to load javax.xml.ws.spi.Pro
by sselvia
Using the wsrunclient and I'm having the following problem:
wsrunclient com.datamentors.web.DMWebClient
javax.xml.ws.WebServiceException: Unable to load Provider: Failed to load javax.xml.ws.spi.Provider: org.jboss.ws.core.jaxws.spi.ProviderImpl
at javax.xml.ws.spi.Provider.provider(Provider.java:98)
at javax.xml.ws.Service.(Service.java:83)
at com.datamentors.web.jboss.DMWebService.(DMWebService.java:40)
at com.datamentors.web.DMWebClient.processJBoss421JAXWSRequest(DMWebClient.java:103)
at com.datamentors.web.DMWebClient.main(DMWebClient.java:131)
Caused by: java.lang.IllegalStateException: Failed to load javax.xml.ws.spi.Provider: org.jboss.ws.core.jaxws.spi.ProviderImpl
at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:96)
at javax.xml.ws.spi.Provider.provider(Provider.java:90)
... 4 more
Caused by: java.lang.NoClassDefFoundError: org/jboss/util/NotImplementedException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:91)
... 5 more
What jar is missing from the wsrunclient classpath???
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084194#4084194
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084194
17 years, 3 months
[JBossWS] - Re: change in run-time the soap:address location of wsdl.
by drblmb
I don't understand how to do this. Using JBossWS 2.0.1GA - and still can't figure out how to override the end point address. What Stub?
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=4084183#4084183
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084183
17 years, 3 months
[JBossWS] - Re: Client Discovery of Service Endpoint in Production Envir
by drblmb
I do understand the question. My question is pretty much the same:
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=4084179#4084179
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084179
17 years, 3 months
[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
17 years, 3 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
17 years, 3 months
[JBossWS] - Re: NoSuchMethodError in remote client WS call
by fabiopmiranda
I'm getting the same error... I used the wsdl4j.jar in the client dir but still not working. I'm using JDK 5 and I think this is a problem with a wrong of some jar...
Exception in thread "main" java.lang.NoSuchMethodError: com.ibm.wsdl.xml.WSDLReaderImpl.setEntityResolver(Lorg/xml/sax/EntityResolver;)V
at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:142)
at org.jboss.ws.metadata.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:273)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:110)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:82)
at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:96)
any help would be appreciated.
Fabio Miranda
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084137#4084137
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084137
17 years, 3 months
[JBossWS] - web service url
by rukus
Good day to all
There is WS from JBossESB quickstarts (nativeclient) for example
Is there any way to determine what url has this web service from sayHello @WebMethod??
/*
| * JBoss, Home of Professional Open Source
| * Copyright 2006, JBoss Inc., and others contributors as indicated
| * by the @authors tag. All rights reserved.
| * See the copyright.txt in the distribution for a
| * full listing of individual contributors.
| * This copyrighted material is made available to anyone wishing to use,
| * modify, copy, or redistribute it subject to the terms and conditions
| * of the GNU Lesser General Public License, v. 2.1.
| * This program is distributed in the hope that it will be useful, but WITHOUT A
| * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
| * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
| * You should have received a copy of the GNU Lesser General Public License,
| * v.2.1 along with this distribution; if not, write to the Free Software
| * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
| * MA 02110-1301, USA.
| *
| * (C) 2005-2006,
| * @author JBoss Inc.
| */
| package org.jboss.soa.esb.samples.quickstart.nativeclient.webservice;
|
| // For setting up the basic WS
|
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
| // For ESB Interaction
| import org.jboss.soa.esb.message.Message; // jbossesb-rosetta.jar
| import org.jboss.soa.esb.message.format.MessageFactory; // jbossesb-rosetta.jar
| import org.jboss.soa.esb.message.format.MessageType; // jbossesb-rosetta.jar
| import org.jboss.soa.esb.client.ServiceInvoker; // jbossesb-rosetta.jar
|
| @WebService(name = "HelloWorld", targetNamespace = "http://nativeclient/helloworld")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public class HelloWorldWS {
| @WebMethod
| public String sayHello(String toWhom) {
| System.out.println("HelloWorld Hit! " + toWhom);
| String results = "";
| try {
| ServiceInvoker deliveryAdapter;
| Message requestMessage;
| Message replyMessage = null;
|
| // Create the delivery adapter for the target service (you'd normally cache this!!)...
| deliveryAdapter = new org.jboss.soa.esb.client.ServiceInvoker("MyServiceCategory", "MyNativeClientService");
| // Create and populate the request message...
| requestMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
| requestMessage.getBody().setByteArray(toWhom.getBytes()); // inject the value from the WS client
| // Deliver the request message synchronously - timeout after 20 seconds...
| replyMessage = deliveryAdapter.deliverSync(requestMessage, 20000);
|
| if (replyMessage != null) {
| results = new String(replyMessage.getBody().getContents());
| } else {
| results = "Hello World: " + toWhom + " on " + new java.util.Date();
| }
| } catch (Exception e) {
| System.out.println(e + "\n");
| e.printStackTrace(System.out);
| }
| return results;
| }
| }
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083918#4083918
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083918
17 years, 3 months