WS 2 « Web Service « Java Enterprise Q&A





1. Regarding javax.xml.ws.Provider interface    coderanch.com

Hi Nitin. Very interesting stuff. You may already have come across these links on the web: - Provides the rationale: http://stackoverflow.com/questions/1730751/advantages-of-using-a-dynamic-client-with-jax-ws - Lots of details starting page 85 - http://fusesource.com/docs/framework/2.0/jaxws/jaxws.pdf - Multiple ways of creating web services where the standard code generation tools may not work: http://java.dzone.com/news/5-techniques-create-web-servic - Using Provider APIs vs code generation tools is like driving manual vs. automatic ...

2. The number of WS instances - how to change it    coderanch.com

annasmalska@interia.pl annasmalska Hello, I have hot a problem and I really need your help. I have got small web application with a web service, build like this: @WebService() @Stateless() public class myWS { ... } Everything is working this fine, but it turned out, that in one time, the number of instances of this web service cant be more than 5. ...

3. com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.net.ConnectException:    coderanch.com

Hello! I am new web services.I just learned how to create and consume a web service (when both are on same machine). But now i am assigned a project to consume a web service which is deployed on some else machine .The problem is when i try to run my project i got following list of exception: com.sun.xml.ws.client.ClientTransportException: HTTP transport error: ...

4. Review the WS Code    coderanch.com

Guys, Please comment on the client code Need Expert comments for the WS that I have created, deployed and consumed. I am learning webservices. I need somebody "expert at Webservices" to have a look at the client I have written and tell me if it has been written the way it has to be? Is there any scope for improvement? Is ...

5. ws-i compliance questions    coderanch.com

Hi, It seems the wsi-tools@ws-i.org mailbox cannot be reached. Is the mail address still correct? Further, I have some questions about WS-I BP 1.1 Compliance Analyzer test results. It would be nice to get response on it. Background: Our requirement is to be WS-I Basic Profile 1.1 compliant for our Web Service created from a designed WSDL (generating all the classes ...

6. WS 2 WS call in same JVM    coderanch.com

The WS I need to develop would call an existing WS [JDK 1.5 / WAS 6.1 cluster using Axis 2]. Both Web Services will be deployed on same JVMs. Is there a way to call the second service directly without having to do an unwanted N/w hop ? The second service becoming remote to my service looks unlikely. How can I ...

7. javax.xml.ws Packaging simple Questions    coderanch.com

Naren Chivukula wrote:Hi Luke, Very good questions indeed! 1. Why are they now in both? This is to provide light weight support of web services in JSE 6 for someone who just wants to develop standalone(without using server) web services rather depending on heavy weight JEE6 API. 2. If there multiple versions of the javax.xml.ws on the classpath which one gets ...

9. Basic Profile WS-I tools    coderanch.com





10. Local ip address and port number of WS client    coderanch.com

Hi! I've created a WS client using wsimport. For my question you may refer to an example taken from http://www.javadb.com/create-a-web-service-client-with-jax-ws . Here is the corresponding client code: wsimport http://localhost:8080/JavaDbExamplesWeb/JavadbWebServiceService?WSDL package com.javadb.examples; import com.javadb.ws.example.JavadbWebService; import com.javadb.ws.example.JavadbWebServiceService; /** * * @author www.javadb.com */ public class Main { public void callWebService() { /* Note, the JavadbWebServiceService class has two constructors. * The default one ...

12. org.springframework.ws.client.WebServiceTransportException: Method Not Allowed [405]    coderanch.com

Hi All, I'm currently trying to get my first spring web service app to work. Every time I run my junit test that calls the service I get the following error:- DEBUG WebServiceTemplate - Received error for request [SaajSoapMessage {http://www.codemonkeyramblings.com/BasicSpringSchema}requestObject] org.springframework.ws.client.WebServiceTransportException: Method Not Allowed [405] The console shows that I'm sending the following soap package:- ...

13. New to Webservices. want to know required jars and tools and know how to implement Hello World WS.    coderanch.com

Hi All, Im new to JavaRanch and Java Web services. i jst want to know how to implement Hello World WS and wht all tools, environments required to implement and is there any specific books for beginners like me. Currently im using Eclipse Helios. can i develop Hello World WS and deploy using tomcat? in my machine, im using Java 1.5 ...

14. javax.xml.ws.WebServiceException: java.io.IOException: Stream is closed    coderanch.com

Hi All, My Eclipse RCP application publishes a JAXB webservice in Eclipse JRE's lightweight webserver. When the service is invoked by an external client, I get a javax.xml.ws.WebServiceException: java.io.IOException: Stream is closed exception. The service is up as I could hit the endpoint wsdl url in the browser. One thing which I have noticed is that when i build the Eclipse ...

15. com.sun.xml.ws.client.ClientTransportException JAX-WS    coderanch.com

Hello All, I have a WSDL file on a remote server. I created a web service client in netbeans (JAX-WS). I tried to access the client generated by netbeans using the following code: MyClient cli= new MyClient (); MyPortType port = cli.getMyWsdConcatPort(); System.out.println(port.myMethod("part1.......", "concanted with part2........")); I am getting the following error: com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 401: Invalid ...

16. Why is my WS expecting a XMLGregorianCalendar datatype?    coderanch.com

import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.ejb.EJB; import javax.ejb.Stateless; import javax.jws.WebService; import org.jboss.wsf.spi.annotation.WebContext; @Stateless @WebContext( contextRoot = "/cis-ws", urlPattern = "/vitalSign" ) @WebService( endpointInterface = "ca.cis.vitalSign.VitalSignService" ) public class VitalSignServiceBean implements VitalSignService { @EJB LabListQuery labListQuery; public List getLabListDate( Long patientId, Date startDate, Date endDate ) { log.info("Patient ID: " + patientId); log.info("Start Date: " + startDate); log.info("Start Date: " ...





19. com.sun.xml.ws.Closeable: Exception while closing Resource Port    coderanch.com

Hello everybody, I've been racking my brain working with a WebService and a client I implemented, the application runs and accomplish the flow successfully. But when every 2 webservice call, it shows an Exception, I think it's because the PORT (It's a Resource type generated from WSDL and XML), I forgot to close it. Nevertheless, the application was originally with METRO, ...

20. WS error in saving objects/printing results    coderanch.com

Hi everybody, I'm trying to write a web service that take an XML file, read some information and then print that. The problem is that during the execution of the client I receive a null pointer exception, but I will explain that later, after showing you the code. Here is a fragment of the XML file (just to gave you the ...

21. Ws Policy for Wss4j    coderanch.com

I have a client and a server .Supposing that the client side has rampart and axis2 ,hence it signs the message using policy.xml. But on the server side , I directly wrote some code where the SOAP message is taken and signed using the WsSecurityEngine().i.e it is using wss4j Can the server side be attached with any policy.xml kind of thing ...

22. Technology/API suggestion for document Style WS    coderanch.com

Hi! This depends a little on the complexity of the documents used to interact with the web service. If the complexity is low to moderate, I would try JAXB. JAXB is, by far, the easiest choice since JAXB bean classes can be generated automatically from XML schema. Performance is also good. If you want to build more complex documents in memory, ...

23. Back-end communication between WS and Java app    coderanch.com

I'm developing a web service which should notify a Java application when it receives a particular SOAP message. So far I've considered using a database table (overkill), sockets (simple but not elegant) and JMS. It's been suggested to use an Enterprise Service Bus like Apache Synapse but that seems like overkill. Any other suggestions? Are there any particular drawbacks to JMS ...

24. com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code -1: null    coderanch.com

Hi guys, I am writing a Web Service api for OCOD and I face a strange issue when I connect using a sun proxy which gives the following exception com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code -1: null at com.sun.xml.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:261) at com.sun.xml.ws.transport.http.client.HttpTransportPipe.createResponsePacket(HttpTransportPipe.java:210) at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:172) at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:95) at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:133) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470) at com.sun.xml.ws.client.Stub.process(Stub.java:319) at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:157) at ...

29. Error WSWS3400I while calling WS    coderanch.com

I am getting the below mentioned error when I am trying to call a WS. I am using com.ibm.ws.webservices.thinclient_6.1.0.jar. Have anyone of you faced the similar error? Java: 1.5 INFO: ssl.disable.url.hostname.verification.CWPKI0027I Oct 28, 2011 4:42:28 PM com.ibm.ws.webservices.engine.PivotHandlerWrapper bindExceptionToResponse SEVERE: WSWS3400I: Info: unexpected exception. Throwable occurred: java.lang.NoSuchFieldError: com/ibm/xml/xlxp/api/was/WSXMLReader.fStringBuffer at com.ibm.xml.xlxp.api.was.WSXMLReader.(WSXMLReader.java:80) at com.ibm.xml.xlxp.api.was.WSXMLReader.(WSXMLReader.java:74) at com.ibm.xml.xlxp.api.was.WSSAXParserImpl.(WSSAXParserImpl.java:44) at com.ibm.xml.xlxp.api.was.WSSAXParserFactoryImpl.newSAXParser(WSSAXParserFactoryImpl.java:42) at com.ibm.ws.webservices.engine.utils.WebServicesParser.(WebServicesParser.java:86) at com.ibm.ws.webservices.engine.utils.WebServicesParserFactory.newSAXParser(WebServicesParserFactory.java:97) at com.ibm.ws.webservices.engine.utils.XMLUtils.getSAXParser(XMLUtils.java:391) ...

30. Consuming a WS from another WS    coderanch.com

Hi, I developed a WS using axis2,eclipse and WTP. I wrote the service, and generated the client via wtp. All works great. Then i wrote a servlet, deployed the client in tomcat and call the WS via servlet-->client-->service. I get a well known WS-A error: servlet side: GRAVE: Servlet.service() for servlet LoginController threw exception org.apache.axis2.AxisFault: The server did not recognise the ...

31. JAX-WS Web Service Client: com.sun.xml.internal.ws.client.ClientTransportEx    forums.oracle.com

Dear Java EE Experts, I have developed a JAX-WS based web service client in net beans. The WSDL is successfully imported. I can create objects based on classes gernerated from WSDL. But when I call the actual web service method (giving an input object and expecting a return/output object), I get an exception: =============================== Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: The server ...