[MOBY-l] registering an axis web service
Benjamin Good
bmg at sfu.ca
Wed Jun 9 18:54:46 UTC 2004
Dear list,
I have developed a moby-compliant web service using Java Axis. How can
I register this with MobyCentral? I've tried using a perl method like
below, but can't seem to get it quite right. Registration succeeds,
but I can't get anything back from the service. Also the wsdl generated
by MobyCentral doesn't match the WSDL generated locally.
sub register_service {
#$C is the moby-central instance
my $C = shift;
my $reg = $C->registerService(
serviceName => echoXMLStringRequest,
authURI => 127.0.0.1,
contactEmail => bmg at sfu.ca,
description => "An axis service for testing",
URL => http://localhost:8080/axis/services/,
input => [ ['', ["Object" => []]], ],
output => [ ['', ["Object" => []]], ],
category => "moby",
serviceType => "Retrieval",
);
die "Bad return value from registerService" unless $reg;
if ($reg->success == 1){
print "Registration successful\n\n";
}
else {
print "Registration failed: ", $reg->message, "\n";
}
}
Here is the WSDL generated when I run it (successfully) from a non-moby
java client
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:biomoby.services"
xmlns:impl="urn:biomoby.services" xmlns:intf="urn:biomoby.services"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:message name="echoXMLStringResponse">
<wsdl:part name="echoXMLStringReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="echoXMLStringRequest">
<wsdl:part name="in0" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="EchoXML">
<wsdl:operation name="echoXMLString" parameterOrder="in0">
<wsdl:input name="echoXMLStringRequest"
message="impl:echoXMLStringRequest"/>
<wsdl:output name="echoXMLStringResponse"
message="impl:echoXMLStringResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="biomoby.servicesSoapBinding" type="impl:EchoXML">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="echoXMLString">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="echoXMLStringRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:biomoby.services"/>
</wsdl:input>
<wsdl:output name="echoXMLStringResponse">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:biomoby.services"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="EchoXMLService">
<wsdl:port name="biomoby.services"
binding="impl:biomoby.servicesSoapBinding">
<wsdlsoap:address
location="http://localhost:8080/axis/services/biomoby.services"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
thanks for any ideas
-Ben
More information about the moby-l
mailing list