0

I'm using the apache CFX wsdl2java tool to convert a wsdl into java classes. The general set-up works fine, but I'm having trouble with this command:

 -p [ wsdl-namespace= ] PackageName

The documentation says:

Specifies zero, or more, package names to use for the generated code. Optionally specifies the WSDL namespace to package name mapping.

However, it only works for a single package for me. The first command below works, the second and the third one doesn't. Did I mess up some syntax?

1) -p namespace1=com.name.webservices http://url-to-my-wsdl.com

2) -p namespace1=com.name.webservices com.name.common http://url-to-my-wsdl.com

3) -p namespace1=com.name.webservices namespaceforcommonobjects=com.name.common http://url-to-my-wsdl.com

In the second example, I'm trying to put everything from namespace1 into package webservices, and all the rest into package common.

In the third example I'm trying to put everything from namespace1 into package webservices, and everything from namespaceforcommonbojects into package common.

I keep getting an exception in my console saying: "Unexpacted argument" and then the url to my wsld, except in example 1, which works fine but does not hve the output I desire...).

1 Answer 1

1

You need to add -p switch before each namespace to package mapping.

-p namespace1=com.name.webservices -p namespaceforcommonobjects=com.name.common http://url-to-my-wsdl.com

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.