wsdl2java

Generate java classes from WSDL through java program

I used wsimport command line tool for creating classses but I want to do it from the java code. Any idea? ...

wsdl2java excpetion

java org.apache.axis2.wsdl.WSDL2Java -s -p studs.exchange -uri https://api.betfair.com/exchange/v5/BFExchangeService.wsdl Retrieving document at 'https://api.betfair.com/exchange/v5/BFExchangeService.wsdl'. log4j:WARN No appenders could be found for logger (org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder). log4j:WARN Please...

Namespace repeated in all nodes using axis2 and java2wdsl

I am using eclipse and axis2 1.4.1 facet to generate a webservice. My problem is that in the generation process, the namespaces are being repeated in all nodes. As you can see below, ns4 is repeated instead of being declared in NewOperationResponse node. How can I make java2wdsl (or eclipse) generate that automatically (only in parent...

Skip maven2 plugin by default

Hello, I am looking for a way to not have a plugin execute on install. More specifically, my scenario is as follows: I am using org.apache.cxf:cxf-codegen-plugin to generate source code. Every time I clean+install the source is generated I only want generation of source code to happen when I explicitly request it. Any and all hel...

How to encrypt a SOAP envelope in WSDL2JAVA generated client

I have been provided with some documentation for connecting to a 3rd party system and a wsdl. The documentation says to generate the client code using WSDL2JAVA, which I have done. but now it says to encrypt the SOAP Envelope using a secret key (which I have been given) and I don't know much about encryption. Am I right in thinking W...

How to Encrypt a soap request using a secretkeyspec?

I have Web Service client code generated by WSDL2Java. I am trying to encrypt the Soap Envelope specifying a CallbackHandler in the wsdd. I've managed to set a username and password in plain text on the soap request, but I need to use a key instead (I have been given a .key file which seems to be a SecretKeySpec). I load the .key file,...

Validate a WSDL using Ant and a third party API?

I'm using Axis2 WSDL2Java, and there appears to be no validate option flag for validating a WSDL before generating the stub. However, my stub generation is failing, and I'm pretty sure it is an issue with a malformed WSDL. The error we get is "can't serialize the policy", which after some research tends to lean toward an invalid WSDL. Ar...

wsdl interoperability problems

I wrote a .asmx web service which I'm trying to consume from a java client. I'm using axis2's wsdl2java to generate code. But it says that the wsdl is invalid. What exactly is the problem here? It is .net which generated the wsdl automatically after all. Are there problems with wsdl standards, rather the lack of them? What can I do now? ...

Where should you put XSD documentation in order for JAXB to pick them up and put them in Javadoc?

I am developing a contract first webservice and wish to include the appropriate documentation in the schema so that it is as self descriptive as possible. What is the best practice to put XSD annotations and documentation such that JAXB picks them up and includes them in the generated Java files as Javadoc? I noticed that some elements ...

Axis2 Class Generation

I have an instance of a derived class (called Child) that I would like to send between the client and server of my web service. However, the method that might be returning this instance, is marked as returning an instance of the parent class (called Parent). For example: public class Service{public Parent createInstanceOfParentOrChildO...

Generating Web Service from WSDL File

I want to generate Web Service Classes from WSDL File. I want server side code not client side. wsimport creates client sides. which tool do you use to create server side code from WSDL File? ...

WSDL with type int or blank is not readable by stubs generated by wsdl2java

I have created a simple type <xsd:simpleType name="IntOrBlank"> <xsd:union memberTypes="xsd:int"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value=""/> </xsd:restriction> </xsd:simpleType> ...

Using CXF's wsdl2java, is there an easier way to generate package names from xml namespaces without version numbers?

I'm using Apache CXF's wsdl2java utility to create some JAXB objects and some web service code. The schema in my WSDL has a lot of namespaces with version numbers on the end. For example: http://example.org/sample/namespace/1.0 When CXF generates my JAXB objects the packages wind up with package names like this: org.example.sample....

wsdl java class case sensitivity

In the wsdl I have 2 types, same name, different cases: LoginResponse and LOGINRESPONSE. If I use xfire to generate the java classes, it only generates one class, LoginResponse, discarding the LOGINRESPONSE. How do I get around this? <s:element name="LoginResponse"> <s:complexType> <s:sequence> <s:element minOccurs="...

WSDL2java generated stubs problem with multi node setup

I have a webservice server which is something like this https://&lt;my domain>/receiver This server serves 2 domains and will route to it's own ports based on the domain name. The axis2 stubs works find if I specify the port, forexample https://&lt;mydomain&gt;:8009/receiver, but it'll not work if it's redirected by apache. For th...

Java WCF SOAPFaultException: Object reference not set to an instance of an object.

I'm attempting to communicate from a Java client to a .NET WCF service hosted in a Windows service on a remote machine. I'm able to access the wsdl file no problem, but when actually communicating, the remote function never gets called. Instead, I get the following error: Jul 28, 2010 2:32:51 PM org.apache.catalina.core.ApplicationCon...

What the difference between JAXB and CXF?

Hi, I have tried to generate java classes from a schema xsd with JAXB2.1 and run XJC and it works. I have included the schema in a wsdl file and i generate java classes with wsdl2java command using CXF. The problem is abouta java class where there are difference: The difference is the content attribute and its getter and setter which is...

WSDL2Java won't create all the stubs

Hello! I'm using Apache axis2 and more specifically, the wsdl2java tool to generate the stubs for a web service and create a client, given the wsdl file. When I try to generate stub classes for a paypal web service (its wsdl file is here) axis won't generate stubs for both the bindings included to the wsdl but just for the second one (...

accessing a web service using axis and maven

Im trying to figure out how to access Web Services in Java using Axis. As far as I understand, Here's what I need to do : Use WSDL File + Axis tools to generate Java files. Compile and package generated Java files and then consume those objects by using connection methods on these. In trying to do this, here's where I'm stuck: I pi...

Apace axis2 wsdl2java tool, foo_type0 classes

When I use wsdl2java - with adb data binding - to create the stubs for a web service given a WSDL file, I get some classes with name foo_type0 what is this type and in witch case is it generated?? Could there be a foo_type1 or foo_type2 type?? I have noticed it's generated when a type at the WSDL includes an < any /> element. ...