none
WebService Java RRS feed

  • Pergunta

  • Boa tarde,

    estou desenvolvendo uma aplicação onde precisarei consumir 1 webservice feito em JAVA, minha duvida é... como devo prosseguir para consumir esse webserviec em minha aplicação? 

     

     - eu preciso colocar o conteudo dele em banco de dados e usar em Session, entao provavelmente tenho que passar o resultado do webservice em algum objeto no C# não é isso?

     

    tenho o modelo de XSD de como vira essas informações:

     

     

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

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

    elementFormDefault="qualified"

    targetNamespace="http://www.meusite.com.br"

    xmlns:teste="http://www.meusite.com.br/teste">

     

    <xs:complexType name="Participante">

    <xs:sequence>

    <xs:element name="dataInicioChamada" maxOccurs="1"

    minOccurs="0">

    <xs:annotation>

    <xs:documentation>

    Data da Chamada do Cliente

    </xs:documentation>

    </xs:annotation>

    <xs:simpleType>

    <xs:restriction base="xs:dateTime" />

    </xs:simpleType>

    </xs:element>

    <xs:element name="dataFimChamada" maxOccurs="1"

    minOccurs="0">

    <xs:annotation>

    <xs:documentation>

    Data da Chamada do Cliente

    </xs:documentation>

    </xs:annotation>

    <xs:simpleType>

    <xs:restriction base="xs:dateTime" />

    </xs:simpleType>

    </xs:element>

    <xs:element name="dataAtendeuChamada" maxOccurs="1"

    minOccurs="0">

    <xs:annotation>

    <xs:documentation>

    Data em que o cliente Atendeu a chamada

    </xs:documentation>

    </xs:annotation>

    <xs:simpleType>

    <xs:restriction base="xs:dateTime" />

    </xs:simpleType>

    </xs:element>

    <xs:element name="dataRetorno" maxOccurs="1"

    minOccurs="0">

    <xs:annotation>

    <xs:documentation>

    Data de retorno da plataforma

    </xs:documentation>

    </xs:annotation>

    <xs:simpleType>

    <xs:restriction base="xs:dateTime" />

    </xs:simpleType>

    </xs:element>

    <xs:element name="duracaoChamada" maxOccurs="1"

    minOccurs="0">

    <xs:simpleType>

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

    <xs:maxLength value="10" />

    </xs:restriction>

    </xs:simpleType>

    </xs:element>

    <xs:element name="retornoOK" maxOccurs="1" minOccurs="0">

    <xs:annotation>

    <xs:documentation>

    Status de retorno

    </xs:documentation>

    </xs:annotation>

    <xs:simpleType>

    <xs:restriction base="xs:boolean"/>

    </xs:simpleType>

    </xs:element>

    <xs:element name="descricaoRetorno" maxOccurs="1" minOccurs="0">

          <xs:annotation>

            <xs:documentation>Descricao do Retorno</xs:documentation>

          </xs:annotation>

          <xs:simpleType>

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

     <xs:maxLength value="200"/>

    </xs:restriction>

    </xs:simpleType>

    </xs:element>

    <xs:element name="numeroOrigemChamada" maxOccurs="1"

    minOccurs="0" type="sg:Numero"/>

    <xs:element name="escolheuOpcaoIvr" maxOccurs="1" minOccurs="0">

    <xs:annotation>

    <xs:documentation>

    retorna falso ou verdadeiro

    </xs:documentation>

    </xs:annotation>

    <xs:simpleType>

    <xs:restriction base="xs:boolean"/>

    </xs:simpleType>

    </xs:element>

    </xs:sequence>

    </xs:complexType>

    <xs:complexType name="ChamadasParticipantes">

    <xs:sequence>

    <xs:element name="chamadaParticipante" maxOccurs="unbounded" minOccurs="0" type="sgp:ChamadaParticipante">

    </xs:element>

    </xs:sequence>

    </xs:complexType>

    </xs:schema>

     

     

    pelo que entendo terei que adicionar ele como webreference no meu projeto... mas como transfomar o resultado em um objeto q eu possa manipular? tenho que serealizar ele? como faz?? obrigado

     

    Thiago


    Thiago Felix
    terça-feira, 13 de abril de 2010 19:39

Respostas