[JBossWS] - @WebFault and @XmlType issues for Exception classes
by yogeshkb
Hi Team,
I have many webservices with operations throwing a common exception (eg., SomeException) across all the services
I tried to annotate the SomeException class using various approaches but failed to generate the client stubs with a common target namespace different from the targetnamespace of the webservice itself.
Approach 1:
Used @XmlType(namespace="common.targetnamespace") in the SomeException class
Approach 2:
Used @WebFault(targetNamespace="common.targetnamespace")
In both the above approaches, the wsconsume generated a separate stub for SomeException class for each webservice in the same targetnamespace of the webservice and not on the specified common.targetnamespace.
My requirement is to generate a single SomeException client stub in the common.targetnamespace.
Pls let me know whether this is a bug or suggest some workarounds.
Regards,
Yogesh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144802#4144802
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4144802
16 years, 11 months
[JBossWS] - Re: Problem consuming .net webservice with jbossws-3.0.1-nat
by richard.opalka@jboss.com
I tried also low level approach based on sockets:
| package org.jboss.test.ws.remoting_issue;
|
| import java.io.InputStream;
| import java.io.OutputStream;
| import java.net.Socket;
|
| public final class Test {
|
| private static final String CRNL = "\r\n";
| private static final String envelope = "<env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'><env:Header></env:Header><env:Body><getToken xmlns='http://webservices.maplink2.com.br'><user>user</user><pwd>password</pwd></getToken></env:Body></env:Envelope>";
| private static final String msg =
| "POST /webservices/v3/Authentication/Authentication.asmx HTTP/1.1" + CRNL +
| "SOAPAction: \"http://webservices.maplink2.com.br/getToken\"" + CRNL +
| "Content-Type: application/soap+xml; charset=UTF-8" + CRNL +
| "JBoss-Remoting-Version: 22" + CRNL +
| "User-Agent: JBossRemoting - 2.2.2.SP4 (Bluto)" + CRNL +
| "Host: webservices.maplink2.com.br" + CRNL +
| "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + CRNL +
| "Connection: keep-alive" + CRNL +
| "Transfer-Encoding: chunked" + CRNL +
| "" + CRNL +
| Integer.toHexString(envelope.length()) + CRNL +
| envelope + CRNL + "0" + CRNL;
|
| public static void main(String[] args) throws Exception
| {
| System.out.println("Sending message" + CRNL + CRNL + msg + CRNL);
| System.out.println("Receiving message" + CRNL);
| Socket socket = new Socket("webservices.maplink2.com.br", 80);
| OutputStream os = socket.getOutputStream();
| os.write(msg.getBytes());
| os.flush();
| InputStream is = socket.getInputStream();
| copy(is, System.out);
| }
|
| private static void copy(InputStream is, OutputStream os) throws Exception
| {
| byte[] buffer = new byte[128];
| int count = -1;
| while ((count = is.read(buffer)) != -1)
| {
| os.write(buffer, 0, count);
| }
| os.flush();
| }
|
| }
|
but still the same result. I'm always getting HTTP 500 error code, not 501 :(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144758#4144758
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4144758
16 years, 11 months