style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-5164839828746352"
data-ad-slot="7563230308">

Ayuda con web service

Hola chavos
Tengo un problema al querer generar el código java de un web service estoy ocupando axis2 1.5.6 y utilizando el comando wsdl2java

\axis2-1.5.6-bin\axis2-1.5.6\bin>wsdl2java -S /ws -p com.scm.wssap -uri http://unadireccion:8000/sap/wsdl/document?sap-client=100

Using AXIS2_HOME:   \axis2-1.5.6-bin\axis2-1.5.6

Using JAVA_HOME:    C:\Archivos de programa\Java\jdk1.5.0_22

Retrieving document at ' http://unadireccion:8000/sap/wsdl/document?sap-client=100'.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: Error parsing WSDL
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:156)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at <a href="http://unadireccion:8000/sap/wsdl/document?sap-client=100
':"
title="http://unadireccion:8000/sap/wsdl/document?sap-client=100
':"
>http://unadireccion:8000/sap/wsdl/document?sap-client=100
':</a> java.io.IOException: Server returned HTTP response code: 401 for URL: ' <a href="http://unadireccion:8000/sap/wsdl/document?sap-client=100'
"
title="http://unadireccion:8000/sap/wsdl/document?sap-client=100'
"
>http://unadireccion:8000/sap/wsdl/document?sap-client=100'
</a>        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(
CodeGenerationEngine.java:288)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:111)
        ... 2 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL:
' <a href="http://unadireccion:8000/sap/wsdl/document?sap-client=100'" title="http://unadireccion:8000/sap/wsdl/document?sap-client=100'">http://unadireccion:8000/sap/wsdl/document?sap-client=100'</a>      
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1196)
        at java.net.URL.openStream(URL.java:1007)
        at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)

        ... 6 more
\axis2-1.5.6-bin\axis2-1.5.6\bin>

Ahora cuando en un navegador pongo la dirección me solicita un usuario y contraseña los capturo y me muestra la definición del wsdl

Cuando lo hago por terminal me manda error http 401

 The request requires user authentication

o sea un error de autenticación o también ya me salió el error 407

This code is similar to 401 (Unauthorized), but indicates that the client must first authenticate itself with the proxy

Pero en la definición de las opciones del comando no identifico algo que me pueda ayudar a pasar el nombre y contraseña de usuario

Short Option
Long Option
Description

-uri <Location of WSDL>
None
WSDL file location. This should point to a WSDL
file in the local file system.

-o <output Location>
--output <output Location>
Output file location. This is where the files would
be copied once the code generation is done. If this option is
omitted the generated files would be copied to the working
directory.

-l <language>
--language <language>
Output language. Currently the code generator can
generate code in Java but it has the ability to be extended to
support other languages.

-p <package name>
--package <package name>
The target package name. If omitted, a default
package (formed using the target namespace of the WSDL) will be
used.

-a
--async
Generate code only for async style. When this
option is used the generated stubs will have only the asynchronous
invocation methods. Switched off by default.

-s
--sync
Generate code only for sync style . When this
option is used the generated stubs will have only the synchronous
invocation methods. Switched off by default. When used with the -a
option, this takes precedence.

-t
--test-case
Generates a test case. In the case of Java it would
be a JUnit test case.

-ss
--server-side
Generates server side code (i.e. skeletons).
Default is off.

-sd
--service-description
Generates the service descriptor (i.e. server.xml).
Default is off. Only valid with -ss, the server side code
generation option.

-d <databinding>
--databinding-method <databinding>
Specifies the Databinding framework. Valid values
are xmlbeans, adb, jibx, and none. Default is adb.

-g
--generate-all
Generates all the classes. This option is valid
only with the -ss (server side code generation) option. When on,
the client code (stubs) will also be generated along with the
skeleton.

-u
--unpack-classes
Unpack classes. This option specifies whether to
unpack the classes and generate separate classes for the
databinders.

-sn <service name>
--service-name <service name>
Specifies the service name to be code generated. If
the service name is not specified, then the first service will be
picked.

-pn <port name>
--port-name <port name>
Specifies the port name to be code generated. If
the port name is not specified, then the first port (of the
selected service) will be picked.

-ns2p
--namespace2package
Specifies a comma separated list of namespaces and
packages where the given package will be used in the place of the
auto generated package for the relevant namespace. The list will be
the format of ns1=pkg1,ns2=pkg2.

-ssi
--serverside-interface
Generate an interface for the service
skeleton.

-wv
--wsdl-version
WSDL Version. Valid Options : 2, 2.0, 1.1

-S
--source-folder
Specify a directory path for generated source

-R
--resource-folder
Specify a directory path for generated resources

-em
--external-mapping
Specify an external mapping file

-f
--flatten-files
Flattens the generated files

-uw
--unwrap-params
Switch on un-wrapping

-xsdconfig

Use XMLBeans .xsdconfig file. Valid only with -d xmlbeans

-ap
--all-ports
Generate code for all ports

-or
--over-ride
Overwrite the existing classes

-b
--backword-compatible
Generate Axis 1.x backword compatible code

-sp
--suppress-prefixes
Suppress namespace prefixes (Optimzation that reduces size of soap request/response)

--noBuildXML
Don't generate the build.xml in the output directory

--noWSDL
Don't generate WSDL's in the resources directory

--noMessageReceiver
Don't generate a MessageReceiver in the generated sources

También intente con la herramienta de axis para eclipse donde ahí si puedo autenticarme pero me regresa el siguiente error

 An error ocurred while completing process –java.lang.reflect.InvocationTargetException 

que en pocas palabras es

InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor. 

Algún tip para poder generar el código y consumir el web service

style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-5164839828746352"
data-ad-slot="7563230308">