wsdl2java

How do I add a namespace reference to a SOAP response with Apache Axis2 and WSDL2Java

I'm looking at the SOAP output from a web service I'm developing, and I noticed something curious: <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"&gt; <soapenv:Body> <ns1:CreateEntityTypesResponse xmlns:ns1="http://somedomain.com/wsinterface"&gt; <newKeys> <value>1234</value> ...

Axis2 Web Service Client Generation - Types without modifying the client

Is it possible with Axis2 and Eclipse to generate a Web Service client and have it use java types that you already have in packages instead of creating it's own types. Reason being of course if I have type A already created and it creates it's own Type A I can't just assign variable of type A to variable of type B. The wsdl is being ge...

Axis2 WSDL2Java : missing no-arg operation in generated stub

Hi, I've got in my webservice a simple public boolean isAlive() service. I defined it in my WSDL : <wsdl:types> <xsd:element name="isAliveResponse" type="xsd:boolean"> </xsd:element> </wsdl:types> <wsdl:message name="isAliveResponse"> <wsdl:part element="ns:isAliveResponse" name="parameters"/> </wsdl:message> <wsdl:portType ...

To create web services,and to create stubs

how to create webservices with an example and to generate client stubs to access serveice from server. i tried with this but not working WSDL2java.bat -url http://localhost:8080/axis2/services/Simpleservices -o c:/to_myfolder i was not able to generate simpleservicestub, WSDL2java.bat conatains set CLASSPATH=%JAVA_HOME%;e:\lib\wsdl...

Generating client code with wsdl2js?

I am trying to use wsdl2js to generate the client-side handler of a SOAP request for a WSDL file but running into a few problems. If I use: >wsdl2js -p [projectName] [wsdlFile] it only generates a javascript file, which isn't what I need. If I use wsdl2js -client [wsdlFile] like they demonstrate, I get an "Unexpected option: -...

AXIS2 generating wrong SOAP Message because of encoding. how to fix it?

QUESTION: how can I use a different encoding (charset and transfer) with axis? Here is my client: public Object[] invoke(String xmlRepresentation) throws CustomApplicationException { Object[] responseWS = null; RPCServiceClient serviceClient = new RPCServiceClient(); Options options = serviceClient.getOption...

How to resolve WSDL2Java creating a static block larger than 64K?

We're currently working with a vendor-provided WSDL schema that is very large. The binding style is RPC. As far as I know, Axis 1.x is the only Java tool supporting RPC WSDL definitions. Please do correct me if I'm wrong about that. WSDL2Java generates a service-nameSkeleton.java file that has a static intialisation block 1.3Mb in size ...

Axis 2 java2wsdl creates different wsdl than JBoss shows in the ?wsdl URL

I'm refactoring the way the client code for a bottom-up web service is built. The existing build creates the Java client code by using a deployment of the web service on JBoss 4.2 and executing the Axis 2 AntCodegenTask against http://devserver.url?wsdl. This method fails if the development server is down or has outdated wsdl. (Crusie...

WSDL2Java generating the same parameter twice when an element and an attribute have the same name

I have an XML schema having an element with the same name as an attribute: ... <xs:sequence> <xs:element name="subscriberId" type="String"/> ... </xs:element> </xs:sequence> <xs:attribute name="subscriberId" type="String" use="required"/> ... Axis 1.4 WSDL2Java generates two equal parameters in the constructor of the class...

Access restriction on class due to restriction on required library rt.jar?

I'm attempting to compile Java 1.4 code that was created by IBM's WSDL2Java on Java5 without recreating the stubs and saw this error in Eclipse. I'm under the assumption that the stubs created should just compile as long as the runtime jars are available (they are). Access restriction: The type QName is not accessible due to restriction...

HOWTO override Axis2 request headers for .NET web service?

I have to use a 3rd party web service implemented in .NET 2.0 (on IIS, of course). I have to make a java client. I am using wsdl2java to generate the SOAP stub. As the original Apache Axis project now appears unmaintained, and I was having some problems parsing some responses from the service, I converted the client to use the latest ...

NullPointerException in SchemaParsingConfig.setFeature() running Axis2 WSDL2Java

In the process of my daily work, I am trying to use the WSDL and XSD from this article: http://www.ibm.com/developerworks/webservices/library/ws-restwsdl/ as a template from which to generate some java code. My desire is to use the generated java code to in some way validate that my (to be) hand-rolled WSDL and schema are reasonably s...

CXF maven plugin generate classes in wrong directory

Hi, I'm using maven cxf-codegen-plugin to generate java web service files from wsdl. The plugin works fine if I'm trying to generate the files in the default output directory (target\generated-sources\cxf), but if I'm trying to generate them in other directory by using: <sourceRoot>src/main/myOtherDir</sourceRoot> in my pom.xml, the...

JBoss: How to generate a Web Service FROM a WSDL?

I need to prototype a very simple system which sends a request to a remote web service, which will then callback on my own web service once it's finished processing. Unfortunately, I have to implement their WSDL for the callback. Is there a nice simple way of generating a JBoss application which will correctly implement the WSDL, and ru...

Why is WSDL parser still importing external documents?

I tried to turn off importing documents in WSDL4J (1.6.2) in the way suggested by the API documentation: wsdlReader.setFeature("javax.wsdl.importDocuments", false); In fact, it stops importing XML schema files declared with wsdl:import tag, but does stop importing files declared with xs:import tags. The following code snippet [see ...

Using xmlbeans bindings for cxf wsdl2java

I am getting started with using apache CXF 2.1.5 and xmlbeans to generate a web service client. The FAQ page shows how to use jaxb bindings to have java.util.Date binding for xsd:dateTime: <jaxws:bindings wsdlLocation="YOUR_WSDL_LOCATION" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:xs="http://www.w3.org/20...

Is it possible to specify the TCP port in mappings in the axis NSToPkg.properties file?

Hi, I'm using the Axis 1.4 axis-wsdl2java ant task to create stub code for a web service hosted on port 8080 of a webserver. I've used the NStoPkg.properties file successfully in the past to map the webserver namespace to a convenient java package name with config lines like this: http\://webserver/somedir/service=com.blah.blah But w...

Axis2 (war) + Tomcat 6: WSDL2Java missing?

Hello guys, I am trying to learn how to implement Web Services using Axis2 and Tomcat, but i'm afraid that i'm not grasping some of the basics. I was following this tutorial but when i attempted to use WSDL2Java i noticed that i do not have the tool anywhere. This happens due to the fact that i downloaded and installed the .war (web ar...

Code First .NET Web Service uses soap encoding - how can this be prevented?

How would one configure asp.net / asmx to not use soap encoding at all when generating wsdls from a .NET interface? In short, a .NET SOAP Web Service is producing a wsdl that includes soap encoding. For example: <s:schema targetNamespace="http://tempuri.org/AbstractTypes"&gt; <s:import namespace="http://schemas.xmlsoap.org/soap/enco...

Axis2's wsdl2java fails on RPC/Encoded style web services.

Is there any alternative to Axis2? Or the way to make it work (different data binding, for example)? Retrieving document at '...'. Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.axis2.wsdl.codegen.CodeGenerati...