Solucionado (ver solução)
Solucionado
(ver solução)
5
respostas

wsconsume WINDOWS CAMINHO

C:\JBoss\bin>wsconsume -k -n -o C:\eclipse\workspace\estoquews_web\src\ C:\eclip se\workspace\estoquews_web\src\EstoqueWSServiceCap5.wsdl

O sistema não pode encontrar o caminho especificado.

5 respostas

C:\JBoss\bin>wsconsume.bat -k -n -o c:\eclipse\workspace\estoquews_web\src \ecli pse\workspace\estoquews_web\src Could not find log4j.xml configuration, logging to console.

Loading FrontEnd jaxws ... Loading DataBinding jaxb ... wsdl2java -exsh false -d c:\eclipse\workspace\estoquews_web\src -verbose -allowE lementReferences file:/C:/eclipse/workspace/estoquews_web/src/ wsdl2java - Apache CXF 2.7.13

JBWS024002: Failed to invoke org.apache.cxf.tools.wsdlto.WSDLToJava org.apache.cxf.tools.common.ToolException: org.apache.cxf.wsdl11.WSDLRuntimeExce ption: Fail to create wsdl definition file:/C:/eclipse/workspace/estoquews_web/s rc/: WSDLException: faultCode=PARSER_ERROR: com.ctc.wstx.exc.WstxUnexpectedCharE xception: Unexpected character 'E' (code 69) in prolog; expected '<' at [row,col,system-id]: [1,1,"file:/C:/eclipse/workspace/estoquews_web/src/"] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon tainer.java:420) at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja va:103) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113) at org.jboss.wsf.stack.cxf.tools.CXFConsumerImpl.consume(CXFConsumerImpl .java:301) at org.jboss.ws.tools.cmd.WSConsume.importServices(WSConsume.java:289) at org.jboss.ws.tools.cmd.WSConsume.mainInternal(WSConsume.java:106) at org.jboss.ws.tools.cmd.WSConsume.main(WSConsume.java:94) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.modules.Module.run(Module.java:312) at org.jboss.modules.Main.main(Main.java:460) Caused by: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl defin ition file:/C:/eclipse/workspace/estoquews_web/src/: WSDLException: faultCode=PA

Oi Edson, vou testar hoje no windows para tentar reproduzir o seu problema.

Tem como me mandar o seu WSDL?

nico.steppat@caelum.com.br

vlw, Nico

OK. Lembrando que foi baixado conforme as instruções; Grato

<?xml version="1.0" encoding="UTF-8" standalone="true"?>

<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.4-b01. -->

-<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://ws.estoque.caelum.com.br/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns="http://schemas.xmlsoap.org/wsdl/" name="EstoqueWSService" targetNamespace="http://ws.estoque.caelum.com.br/">


-<types>


-<xs:schema targetNamespace="http://ws.estoque.caelum.com.br/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">

<xs:element name="AutorizacaoFault" type="xs:string" nillable="true"/>

<xs:element name="CadastrarItem" type="tns:CadastrarItem"/>

<xs:element name="CadastrarItemResponse" type="tns:CadastrarItemResponse"/>

<xs:element name="TodosOsItens" type="tns:TodosOsItens"/>

<xs:element name="TodosOsItensResponse" type="tns:TodosOsItensResponse"/>

<xs:element name="filtros" type="tns:filtros"/>

<xs:element name="listaItens" type="tns:listaItens"/>

<xs:element name="tokenUsuario" type="tns:tokenUsuario" nillable="true"/>


-<xs:complexType name="TodosOsItens">


-<xs:sequence>

<xs:element minOccurs="0" ref="tns:filtros"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="filtros">


-<xs:sequence>

<xs:element name="filtro" type="tns:filtro" minOccurs="0" maxOccurs="unbounded"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="filtro">


-<xs:sequence>

<xs:element name="nome" type="xs:string" minOccurs="0"/>

<xs:element name="tipo" type="tns:tipoItem" minOccurs="0"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="TodosOsItensResponse">


-<xs:sequence>

<xs:element name="itens" type="tns:listaItens" minOccurs="0"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="listaItens">


-<xs:sequence>

<xs:element name="item" type="tns:item" minOccurs="0" maxOccurs="unbounded"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="item">


-<xs:sequence>

<xs:element name="codigo" type="xs:string" minOccurs="0"/>

<xs:element name="nome" type="xs:string" minOccurs="0"/>

<xs:element name="quantidade" type="xs:int"/>

<xs:element name="tipo" type="xs:string" minOccurs="0"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="CadastrarItem">


-<xs:sequence>

<xs:element name="item" type="tns:item" minOccurs="0"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="tokenUsuario">


-<xs:sequence>

<xs:element name="dataValidade" type="xs:dateTime" minOccurs="0"/>

<xs:element name="token" type="xs:string" minOccurs="0"/>

</xs:sequence>

</xs:complexType>


-<xs:complexType name="CadastrarItemResponse">


-<xs:sequence>

<xs:element name="item" type="tns:item" minOccurs="0"/>

</xs:sequence>

</xs:complexType>


-<xs:simpleType name="tipoItem">


-<xs:restriction base="xs:string">

<xs:enumeration value="Livro"/>

<xs:enumeration value="Celular"/>

<xs:enumeration value="Tablet"/>

</xs:restriction>

</xs:simpleType>

</xs:schema>

</types>


-<message name="TodosOsItens">

<part name="parameters" element="tns:TodosOsItens"/>

</message>


-<message name="TodosOsItensResponse">

<part name="parameters" element="tns:TodosOsItensResponse"/>

</message>


-<message name="CadastrarItem">

<part name="parameters" element="tns:CadastrarItem"/>

<part name="tokenUsuario" element="tns:tokenUsuario"/>

</message>


-<message name="CadastrarItemResponse">

<part name="result" element="tns:CadastrarItemResponse"/>

</message>


-<message name="AutorizacaoFault">

<part name="fault" element="tns:AutorizacaoFault"/>

</message>


-<portType name="EstoqueWS">


-<operation name="TodosOsItens">

<input message="tns:TodosOsItens" wsam:Action="http://ws.estoque.caelum.com.br/EstoqueWS/TodosOsItensRequest"/>

<output message="tns:TodosOsItensResponse" wsam:Action="http://ws.estoque.caelum.com.br/EstoqueWS/TodosOsItensResponse"/>

</operation>


-<operation name="CadastrarItem" parameterOrder="parameters tokenUsuario">

<input message="tns:CadastrarItem" wsam:Action="http://ws.estoque.caelum.com.br/EstoqueWS/CadastrarItemRequest"/>

<output message="tns:CadastrarItemResponse" wsam:Action="http://ws.estoque.caelum.com.br/EstoqueWS/CadastrarItemResponse"/>

<fault name="AutorizacaoFault" message="tns:AutorizacaoFault" wsam:Action="http://ws.estoque.caelum.com.br/EstoqueWS/CadastrarItem/Fault/AutorizacaoException"/>

</operation>

</portType>


-<binding name="EstoqueWSPortBinding" type="tns:EstoqueWS">

<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>


-<operation name="TodosOsItens">

<soap:operation soapAction=""/>


-<input>

<soap:body use="literal"/>

</input>


-<output>

<soap:body use="literal"/>

</output>

</operation>


-<operation name="CadastrarItem">

<soap:operation soapAction=""/>


-<input>

<soap:body use="literal" parts="parameters"/>

<soap:header message="tns:CadastrarItem" use="literal" part="tokenUsuario"/>

</input>


-<output>

<soap:body use="literal"/>

</output>


-<fault name="AutorizacaoFault">

<soap:fault name="AutorizacaoFault" use="literal"/>

</fault>

</operation>

</binding>


-<service name="EstoqueWSService">


-<port name="EstoqueWSPort" binding="tns:EstoqueWSPortBinding">

<soap:address location="REPLACE_WITH_ACTUAL_URL"/>

</port>

</service>

</definitions>

Oi Edson,

consegui gerar aqui. testei no mac e windows com jdk 1.8 e wildfly 8.1.0.

qual versão do java vc esta usando?

abs

solução!

Nico:

Obrigado, consegui executar em minha máquina. Devo ter tido problemas no copy /paste do bloco de notas para a tela de comandos.

Grato