J
josh
Hey All,
Thanks Dino for your previous help.
I have a working Perl script on a Linux box using a soap::lite wrapper. I
am trying to use the Perl module WSDL::generator to generate a WSDL. Using
that WSDL. I was hoping to reference the Perl web method from an ASP.Net web
part. The problem is that when I add the web-reference using VS I get the
following error
"Custom tool error: Unable to import WebService/Schema. Unable to import
binding 'smssendSMSBinding' from namespace 'http://janus/AxeSMS'. Unable to
import operation 'sendSMS'. The element 'http://janus/AxeSMS:sendSMSRequest'
is missing.".
I realize this is generated via the WSDL, but what is wrong with it?
Thanks for your help,
Josh.
THE CODE:
THE WSDL:
<?xml version="1.0"?>
<definitions name="sendSMS"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="http://janus/AxeSMS"
xmlns:s="http://janus/AxeSMS"
xmlns:s0="http://janus/AxeSMS"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xsd:schema targetNamespace="">
<xsd:element name="sendSMSRequest" type="xsd:string"
/>
<xsd:element name="sendSMSResponse"
type="xsd:string" />
</xsd:schema>
</types>
<message name="sendSMSRequest">
<part name="sendSMSRequestSoapMsg"
element="s0:sendSMSRequest"/>
</message>
<message name="sendSMSResponse">
<part name="sendSMSResponseSoapMsg"
element="s0:sendSMSResponse"/>
</message>
<portType name="smssendSMSPortType">
<operation name="sendSMS">
<input message="s:sendSMSRequest" />
<output message="s:sendSMSResponse" />
</operation>
</portType>
<binding name="smssendSMSBinding" type="s:smssendSMSPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sendSMS">
<soapperation style="document"
soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="sendSMS">
<documentation>
Send SMS
</documentation>
<port name="smssendSMSPort" binding="s:smssendSMSBinding">
<soap:address
location="http://janus/cgi-bin/sms.cgi"/>
</port>
</service>
</definitions>
THE PERL SOAP WRAPPER
#!/usr/bin/perl -w
# hw_client.pl - SMS Client, note that asp.net demands very specific things
to be defined in the SOAP::lite interface.
# ASP.NET demands that everything has a namespace including the input/output
parameters, and that the input parameters also have a specific type assigned
to them.
use lib '/usr/local/apache/cgi-bin/AxeSMS/';
use SOAP::Lite;
my $no = shift;
my $txt = shift;
print "\n\nCalling the SOAP Server to say hello\n\n";
#print SOAP::Lite
# -> uri('http://janus/AxeSMS')
# -> proxy('http://janus/cgi-bin/sms2.cgi')
# -> sendSMS($no, $txt)
# -> result . "\n\n";
print SOAP::Lite
-> uri('http://janus/AxeSMS')
-> on_action(sub{sprintf '%s/%s', @_ })
-> proxy('http://janus/cgi-bin/sms.cgi')
-> sendSMS(SOAP:ata -> name(no => $no) -> type('string') ->
uri('http://janus/AxeSMS'), SOAP:ata -> name(txt => $txt) ->
type('string') -> uri('http://janus/AxeSMS'))
-> result . "\n\n";
Thanks Dino for your previous help.
I have a working Perl script on a Linux box using a soap::lite wrapper. I
am trying to use the Perl module WSDL::generator to generate a WSDL. Using
that WSDL. I was hoping to reference the Perl web method from an ASP.Net web
part. The problem is that when I add the web-reference using VS I get the
following error
"Custom tool error: Unable to import WebService/Schema. Unable to import
binding 'smssendSMSBinding' from namespace 'http://janus/AxeSMS'. Unable to
import operation 'sendSMS'. The element 'http://janus/AxeSMS:sendSMSRequest'
is missing.".
I realize this is generated via the WSDL, but what is wrong with it?
Thanks for your help,
Josh.
THE CODE:
THE WSDL:
<?xml version="1.0"?>
<definitions name="sendSMS"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="http://janus/AxeSMS"
xmlns:s="http://janus/AxeSMS"
xmlns:s0="http://janus/AxeSMS"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xsd:schema targetNamespace="">
<xsd:element name="sendSMSRequest" type="xsd:string"
/>
<xsd:element name="sendSMSResponse"
type="xsd:string" />
</xsd:schema>
</types>
<message name="sendSMSRequest">
<part name="sendSMSRequestSoapMsg"
element="s0:sendSMSRequest"/>
</message>
<message name="sendSMSResponse">
<part name="sendSMSResponseSoapMsg"
element="s0:sendSMSResponse"/>
</message>
<portType name="smssendSMSPortType">
<operation name="sendSMS">
<input message="s:sendSMSRequest" />
<output message="s:sendSMSResponse" />
</operation>
</portType>
<binding name="smssendSMSBinding" type="s:smssendSMSPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sendSMS">
<soapperation style="document"
soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="sendSMS">
<documentation>
Send SMS
</documentation>
<port name="smssendSMSPort" binding="s:smssendSMSBinding">
<soap:address
location="http://janus/cgi-bin/sms.cgi"/>
</port>
</service>
</definitions>
THE PERL SOAP WRAPPER
#!/usr/bin/perl -w
# hw_client.pl - SMS Client, note that asp.net demands very specific things
to be defined in the SOAP::lite interface.
# ASP.NET demands that everything has a namespace including the input/output
parameters, and that the input parameters also have a specific type assigned
to them.
use lib '/usr/local/apache/cgi-bin/AxeSMS/';
use SOAP::Lite;
my $no = shift;
my $txt = shift;
print "\n\nCalling the SOAP Server to say hello\n\n";
#print SOAP::Lite
# -> uri('http://janus/AxeSMS')
# -> proxy('http://janus/cgi-bin/sms2.cgi')
# -> sendSMS($no, $txt)
# -> result . "\n\n";
print SOAP::Lite
-> uri('http://janus/AxeSMS')
-> on_action(sub{sprintf '%s/%s', @_ })
-> proxy('http://janus/cgi-bin/sms.cgi')
-> sendSMS(SOAP:ata -> name(no => $no) -> type('string') ->
uri('http://janus/AxeSMS'), SOAP:ata -> name(txt => $txt) ->
type('string') -> uri('http://janus/AxeSMS'))
-> result . "\n\n";