I recently been assigned a project to develop an internal web service that makes use of an outside service from Sprint. the only thing I have is a .wsdl file web reference from Sprint. When I add the web reference to the project and compile my code, I get a parser error message (posted).

I have used web services before; meaning that they have an extension of .asmx. however, this service has an ?wsdl format and I don't know if there is a real difference. How can I fix the .wsdl file to prevent the compilation error (posted).

If you need copy of .wsdl and .discomap file I can provide that.

Full error code

Parser Error Message: Schema item 'element' named 'getSmsDeliveryStatus' from namespace 'http://www.csapi.org/schema/parlayx/sms/send/v1_0/local'. The global element 'http://www.csapi.org/schema/parlayx/sms/send/v1_0/local:getSmsDeliveryStatus' has already been declared.

I recently been assigned a project to develop an internal web service that makes use of an outside service from Sprint. the only thing I have is a .wsdl file web reference from Sprint. When I add the web reference to the project and compile my code, I get a parser error message (posted).

I have used web services before; meaning that they have an extension of .asmx. however, this service has an ?wsdl format and I don't know if there is a real difference. How can I fix the .wsdl file to prevent the compilation error (posted).

If you need copy of .wsdl and .discomap file I can provide that.

Full error code

Parser Error Message: Schema item 'element' named 'getSmsDeliveryStatus' from namespace 'http://www.csapi.org/schema/parlayx/sms/send/v1_0/local'. The global element 'http://www.csapi.org/schema/parlayx/sms/send/v1_0/local:getSmsDeliveryStatus' has already been declared.

Hi There,

WSDL stands for Web Service Description Language, it is a platform independant format for describing a set of network services (in XML) where as ASMX (Active Server Methods) as far I am aware is a Microsoft (ASP.NET) implementation only (being a class of .NET methods).

What are you developing on? (VS 2005/2008/etc) What are you developing with? (VB.NET/C#.NET/etc)

Please post a copy of the WSDL file.

Green2Go

I am developing a web service for our internal client and this web service MUST make use of the Spring .wsdl.

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:tns="http://www.csapi.org/wsdl/parlayx/sms/send/v1_0/service" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:interface="http://www.csapi.org/wsdl/parlayx/sms/send/v1_0/interface" xmlns="http://schemas.xmlsoap.org/wsdl/" name="parlayx_sms_send_service" targetNamespace="http://www.csapi.org/wsdl/parlayx/sms/send/v1_0/service" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:import namespace="http://www.csapi.org/wsdl/parlayx/sms/send/v1_0/interface" location="http://testgatewaytws.pcslab.com/SendSmsService/5939559e237816bf1033ed00281dd0f5?wsdl=parlayx_sms_send_interface.wsdl" />
  <wsdl:types />
  <wsdl:binding name="SendSmsBinding" type="interface:SendSms">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="sendSms">
      <soap:operation soapAction="" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
      <wsdl:fault name="InvalidArgumentException">
        <soap:fault use="literal" name="InvalidArgumentException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="UnknownEndUserException">
        <soap:fault use="literal" name="UnknownEndUserException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="MessageTooLongException">
        <soap:fault use="literal" name="MessageTooLongException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="PolicyException">
        <soap:fault use="literal" name="PolicyException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="ServiceException">
        <soap:fault use="literal" name="ServiceException" namespace="" />
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="sendSmsLogo">
      <soap:operation soapAction="" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
      <wsdl:fault name="InvalidArgumentException">
        <soap:fault use="literal" name="InvalidArgumentException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="UnknownEndUserException">
        <soap:fault use="literal" name="UnknownEndUserException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="UnsupportedFormatException">
        <soap:fault use="literal" name="UnsupportedFormatException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="MessageTooLongException">
        <soap:fault use="literal" name="MessageTooLongException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="PolicyException">
        <soap:fault use="literal" name="PolicyException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="ServiceException">
        <soap:fault use="literal" name="ServiceException" namespace="" />
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="sendSmsRingTone">
      <soap:operation soapAction="" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
      <wsdl:fault name="InvalidArgumentException">
        <soap:fault use="literal" name="InvalidArgumentException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="UnknownEndUserException">
        <soap:fault use="literal" name="UnknownEndUserException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="UnsupportedFormatException">
        <soap:fault use="literal" name="UnsupportedFormatException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="MessageTooLongException">
        <soap:fault use="literal" name="MessageTooLongException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="PolicyException">
        <soap:fault use="literal" name="PolicyException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="ServiceException">
        <soap:fault use="literal" name="ServiceException" namespace="" />
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getSmsDeliveryStatus">
      <soap:operation soapAction="" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
      <wsdl:fault name="UnknownRequestIdentifierException">
        <soap:fault use="literal" name="UnknownRequestIdentifierException" namespace="" />
      </wsdl:fault>
      <wsdl:fault name="ServiceException">
        <soap:fault use="literal" name="ServiceException" namespace="" />
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="SendSmsService">
    <wsdl:port name="SendSms" binding="tns:SendSmsBinding">
      <soap:address location="http://testgatewaytws.pcslab.com/SendSmsService/5939559e237816bf1033ed00281dd0f5" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

You didn't mention what your developing in or on?

Update: I've just brief look at the wsdl file, so far I found these problems:

1) All of the references that point towards 'http://www.csapi.org' don't work!
2) This wsdl file references another wsdl file located at 'http://testgatewaytws.pcslab.com/SendSmsService/5939559e237816bf1033ed00281dd0f5?wsdl=parlayx_sms_send_interface.wsdl', I cannot get there server to respond??

All of these will cause issues with VS.NET.

Hi There,

WSDL stands for Web Service Description Language, it is a platform independant format for describing a set of network services (in XML) where as ASMX (Active Server Methods) as far I am aware is a Microsoft (ASP.NET) implementation only (being a class of .NET methods).

What are you developing on? (VS 2005/2008/etc) What are you developing with? (VB.NET/C#.NET/etc)

Please post a copy of the WSDL file.

Green2Go

C#.NET

As I said the WSDL code above contains errors. If you can't access the 'location' url that the WSDL code refers to the service will simply not work. On top of that many of the 'xmlns' urls do not work either.

Additionally, WSDL files are usually kept on the vendors server and referenced from there not on a local machine. I have known VS.NET to be a bit 'picky' using these files from hard drive.

I would tell sprint to give you a decent WSDL file or reference because with this one, unless the urls start working, you've not got a hope in hell of using their service.

Can you access the URL below?:

http://testgatewaytws.pcslab.com/SendSmsService/5939559e237816bf1033ed00281dd0f5?wsdl=parlayx_sms_send_interface.wsdl

Yes I can and you are right there is a problem with the wsdl and Sprint is currently working on the repair. However, they have one of the services fix and I am now able to access the methods within. but for some reason, I can't make use of the RequestSoadContext.Security.Elements.Add(xxxx) method. Would this be a function of X509 or a method within the wsdl?

Hi,

we are facing same issue. but the wsdl url is pointing to different server.
Can you please provide us some working sample or example using which we can use .wsdl file.

Thanks in advance.

Hi all ,
Do we have any Solution to above problem ?
I am using parlayx api-s and am facing issues for the tns due to csapi.org .
What to do ?

Thanks .

Hi,
I think the solution is to modify the soap message before it get submitted to server, and during that modification we can add required missing things.

Like i know that soap message has 4 stages SoapMessageStage.BeforeSerialize,SoapMessageStage.AfterSerialize, SoapMessageStage.BeforeDeserialize and SoapMessageStage.AfterDeserialize

this are the section where we can do the modification of soap message.

If you want to test that given WSDL file locally, you might have to set it up first on your Windows Computer which has IIS Service installed. In Computer Management's IIS Service, create a virtual directory under the Default Web Site. In your newly created virtual directory properties, configure the Local Path with a given wsdl file that you saved on your PC. After you have done all of these, then you should be able to add a web reference to your project by using the discovering tool within the Visual Studio.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.