Sometimes you may want to create a JAX-WS webservice with its input defined by a proper, structured XSD yet accessing the input as raw XML object and not as POJOs produced by JAXB, similarly as with a JAX-RPC webservice having input of the type SOAPElement. This is possible using @WebServiceProvider with javax.xml.ws.Service.Mode.PAYLOAD.
If you want to experiment with webservices by providing several alternative implementations of the same webservice (represented by the <wsdl:service> element), each having its own URL, and you’re using Websphere 7 and JAX-WS, then: For each alternative implementation, add <wsdl:port> with a unique name under the <wsdl:service> element in the WSDL file. Beware: This isContinue reading “Tip: Multiple webservice implementation classes available at the same time under WAS7”
JMeter is great for functional and performance testing of many things, including web services (and to my surprise also LDAP). It also provides means for extracting data from a response and passing them to a subsequent request, which is exactly what I needed. There is already a good tutorial on testing a WS with JMeter,Continue reading “Webservice testing with JMeter: Passing data from a response to another request”
You may want to test you web service by sending it a manually composed request and reading the XML returned. Here’s how to do it (e.g. using BeanShell in jEdit): The SOAP request <?xml version=”1.0″ encoding=”utf-16″?> <soap:Envelope xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”> <soap:Body> <getUserByEmail xmlns=”http://service.w3.ibm.com”> <iuser>firstname.lastname@example.org</iuser> </getUserByEmail> </soap:Body> </soap:Envelope> The Java code String soapXml = // jEdit:Continue reading “Sending a SOAP request to a Web Service via URLConnection”