Hi BKBK,
Follows the code in the page WS.CFM
<cfif isDefined("form.email")>
<cfset cliente = structNew()>
<cfset cliente.NomeFantasia = form.NomeFantasia>
<cfset cliente.documento = form.documento>
<cfset cliente.inscricaoEstadual = form.inscricaoEstadual>
<cfset cliente.email = form.email>
<cfset cliente.endereco1 = form.endereco1>
<cfset cliente.endereco2 = form.endereco2>
<cfset cliente.cidade = form.cidade>
<cfset cliente.estado = form.estado>
<cfset cliente.cep = form.cep>
</cfif>
<form action="http://0.0.0.0:8080/0WS/services/ClienteWSService?wsdl" method="post" name="ContactForm" id="contactForm">
<input type="text" class="input-box" name="nome" placeholder="Digite a Razão Social." id="nome">
<input type="text" class="input-box" name="nomeFantasia" placeholder="Digite o Nome de Fantasia." id="nomeFantasia">
<input type="text" class="input-box" name="documento" placeholder="Digite o CNPJ." id="documento">
<input type="text" class="input-box" name="inscricaoEstadual" placeholder="Digite Inscrição Estadual." id="inscricaoEstadual">
<input type="text" class="input-box" name="endereco1" placeholder="Digite o Endereço." id="endereco1">
<input type="text" class="input-box" name="endereco2" placeholder="Digite o Endereço." id="endereco2">
<input type="text" class="input-box" name="cidade" placeholder="Digite a Cidade." id="cidade">
<input type="text" class="input-box" name="estado" placeholder="Assunto." id="estado">
<input type="text" class="input-box" name="cep" placeholder="Assunto." id="cep">
<input type="submit" name="submitf" id="submitf" value="Send to Webservice">
</form>
In the same form, I have more information, like Representante Legal for the Representate Legal I create other struct or inside this same CFIF I can put the information like <cfset cliente.NomeFantasia = form.NomeFantasia> and <cfset cliente.Nome= form.Nome>?
It's correct?
Best Regards and Tks for your help!!!
Fabiano
You have now made it more complicated. To return to your original question,
|
I have this form, and I have which send information to a web service:
How I can?
FORM
<input type="text" name="name">
<input type="text" name="cpf">
<input type="text" name="inscricaoEstadual">
<input type="text" name="email">
WS
<xs:complexType name="cliente">
<xs:sequence>
<xs:element minOccurs="0" name="name" type="tns:clienteContato"/>
<xs:element minOccurs="0" name="cpf" type="xs:long"/>
<xs:element minOccurs="0" name="inscricaoEstadual" type="xs:string"/>
<xs:element minOccurs="0" name="email" type="xs:long"/>
</xs:sequence>
|
form.cfm
<form action="../ws/ws.cfm" method="post" name="ContactForm" id="contactForm">
<input type="text" name="name">
<input type="text" name="cpf">
<input type="text" name="inscricaoEstadual">
<input type="text" name="email">
<input type="submit" name="submitf" id="submitf" value="Send to Webservice">
</form>
ws.cfm
<cfif isDefined("form.email")>
<cfset cliente. = structNew()>
<cfset cliente.name = form.name>
<cfset cliente.cpf = form.cpf>
<cfset cliente.inscricaoEstadual = form.inscricaoEstadual>
<cfset cliente.email = form.email>
<cfset ws = createObject("webservice", "http://0.0.0.0:8080/0WS/services/ClienteWSService?wsdl">
<cfset result = ws.wsOperation(cliente)>
</cfif>