.NET Programming
--
Questions
--
Followers
Top Experts
Does anyone know why this might be. I am utterly confused. (Debug tips, etc.?).
Thanks in advance,
oddic
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
but that you put it in the wrong namespace, so the service doesn't see it
<soap:Body>
    <Create xmlns="https://services.experts.com:448/">
    <xml>xmlString</xml>
    </Create>
</soap:Body>'
However, when I try to use that the service fails becuase the xmlns above is not accesible by the server hosting the web service! (it is only accessible externally- to access the same resources on the server internally you can only use: http://[servername]:81 ...
When I created the web service in VS2005, I specified the above xmlns as the service namespace. When I try to change it, the web service call fails. Is my only option to somehow get my network admin to make the xmlns URL accessible internally?
Sorry so long, but, I think you have hit the issue on the head- now I just gotta fix it!
Thanks in advance!!!!!!
-oddic






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
So just to clarify- can I use the same unique (not resolving to anything) namespace for my SOAPAction header, my xmlns attribute of my soap:Body param, AND my .NET service namespace?
I just need to tie everything together....
As far as using the same namespace within the service - I'm not a SOAP expert but I believe that you can. Â It doesn't have to match the code's internal .NET namespace either. Â
I typically use a namespace that includes the name of the company, the application, and the method name (e.g. http:\\www.mycompany.com\myapp\mymethod). Â It doesn't even have to be a valid URL let alone resolve to anything.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
    <Create xmlns="https://services.experts.com:448/">
    <xml>xmlString</xml>
    </Create>
</soap:Body>
in this example Create and xml are in the "https://services.experts.com:448/"Â namespace
(the https... part is a simple unique string that took the url form, because when you take your own domain in the name, chances are small someone else will ever pick the same unique ID)
The webservice defines which amespaces are required
Likely the parameters have a different namespace and the service is expecting that
<soap:Body>
    <Create xmlns="https://services.experts.com:448/">
    <xml xmlns="https://anotherservice.experts.com:448>xmlString</xml>
    </Create>
</soap:Body>
Try to find an example of a working envelope, or look in the wsdl
cheers
Geert
1). Changed the namespace of the web service a la:
[WebService(Namespace = "http://webservices.mycompany.com/test99/Ws/")]
2). I changed the calling script on the client in two places:
  2a). I changed SOAPAction= 'http://webservices.mycompany.mydept.test99.com/MyWebMethod'
  2b). I changed the xmlns attribute of the <Create.. tag to: Â
<Create xmlns="http://webservices.mycompany.com/test99/Ws/">
Is that all that is needed technically?
PS (BIG PS- May be the root of my prblem...): the web service is accessed via https over port 448. Everything above *almost* works, but the service fails because it cannot access the xmlns namespace. I removed the xmlns attribute and the call went through, but (obviously) once again, the web service could not find the string parameter.
Is there something special I need to do to make my non-resolving, unique Ws namespace accessible over 488 traffic? (I tried just adding https and :448... but that didn't budge).
Do I need to do something in IIS?
The service fails everytime I try to specify the xmlns attribute- even if it matches the namespace I gave the .NET web service. (??)
Thanks a ton in advance (I am almost there!)
  Â






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Does anyone know what in the heck could be going on? My SOAPAction is set to the correct namespace and it seems to have no problem with that. It's just this darn xmlns attribute in the soap:Body that is tripping everything up (and nullifying the string parameter I am sending to my web service).
All suggestions, hints, tips, links, encouragement, (lol) is very welcome.
Thanks
<soap:Body>
    <Create>
    <xml xmlns="find the correct namespace here">xmlString</xml>
    </Create>
</soap:Body>
so only the parameter itself gets a namespace
maybe we can derive something from the wsdl

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
((the web method is CreateObj (renamed to protect confidential info)):
 <?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://webservices.xyz12307.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://webservices.xyz12307.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualif
- <s:element name="Hello">
 <s:complexType />
 </s:element>
- <s:element name="HelloResponse">
- <s:complexType>
- <s:sequence>
 <s:element minOccurs="0" maxOccurs="1" name="HelloResult" type="s:string" />
 </s:sequence>
 </s:complexType>
 </s:element>
- <s:element name="EventLogTest">
- <s:complexType>
- <s:sequence>
 <s:element minOccurs="0" maxOccurs="1" name="msg" type="s:string" />
 <s:element minOccurs="1" maxOccurs="1" name="ltype" type="tns:EventLogEntryTyp
 </s:sequence>
 </s:complexType>
 </s:element>
- <s:simpleType name="EventLogEntryType">
- <s:restriction base="s:string">
 <s:enumeration value="Error" />
 <s:enumeration value="Warning" />
 <s:enumeration value="Information" />
 <s:enumeration value="SuccessAudit" />
 <s:enumeration value="FailureAudit" />
 </s:restriction>
 </s:simpleType>
- <s:element name="EventLogTestResponse
- <s:complexType>
- <s:sequence>
 <s:element minOccurs="1" maxOccurs="1" name="EventLogTestResult" type="s:int" />
 </s:sequence>
 </s:complexType>
 </s:element>
- <s:element name="CreateObj">
- <s:complexType>
- <s:sequence>
 <s:element minOccurs="0" maxOccurs="1" name="xmlDeals" type="s:string" />
 </s:sequence>
 </s:complexType>
 </s:element>
- <s:element name="CreateObjResponse">
- <s:complexType>
- <s:sequence>
 <s:element minOccurs="0" maxOccurs="1" name="CreateObjResult" type="s:string" />
 </s:sequence>
 </s:complexType>
 </s:element>
- <s:element name="CreateDataClient">
- <s:complexType>
- <s:sequence>
 <s:element minOccurs="0" maxOccurs="1" name="clientName" type="s:string" />
 <s:element minOccurs="1" maxOccurs="1" name="clientID" type="s:int" />
 </s:sequence>
 </s:complexType>
 </s:element>
- <s:element name="CreateDataClientResp
- <s:complexType>
- <s:sequence>
 <s:element minOccurs="1" maxOccurs="1" name="CreateDataClientResu
 </s:sequence>
 </s:complexType>
 </s:element>
 </s:schema>
 </wsdl:types>
- <wsdl:message name="HelloSoapIn">
 <wsdl:part name="parameters" element="tns:Hello" />
 </wsdl:message>
- <wsdl:message name="HelloSoapOut">
 <wsdl:part name="parameters" element="tns:HelloResponse
 </wsdl:message>
- <wsdl:message name="EventLogTestSoapIn">
 <wsdl:part name="parameters" element="tns:EventLogTest"
 </wsdl:message>
- <wsdl:message name="EventLogTestSoapOut"
 <wsdl:part name="parameters" element="tns:EventLogTestR
 </wsdl:message>
- <wsdl:message name="CreateObjSoapIn">
 <wsdl:part name="parameters" element="tns:CreateObj" />
 </wsdl:message>
- <wsdl:message name="CreateObjSoapOut">
 <wsdl:part name="parameters" element="tns:CreateObjResp
 </wsdl:message>
- <wsdl:message name="CreateDataClientSoap
 <wsdl:part name="parameters" element="tns:CreateDataCli
 </wsdl:message>
- <wsdl:message name="CreateDataClientSoap
 <wsdl:part name="parameters" element="tns:CreateDataCli
 </wsdl:message>
- <wsdl:portType name="DataServiceSoap">
- <wsdl:operation name="Hello">
 <wsdl:input message="tns:HelloSoapIn" />
 <wsdl:output message="tns:HelloSoapOut"
 </wsdl:operation>
- <wsdl:operation name="EventLogTest">
 <wsdl:input message="tns:EventLogTestS
 <wsdl:output message="tns:EventLogTestS
 </wsdl:operation>
- <wsdl:operation name="CreateObj">
 <wsdl:input message="tns:CreateObjSoap
 <wsdl:output message="tns:CreateObjSoap
 </wsdl:operation>
- <wsdl:operation name="CreateDataClient">
 <wsdl:input message="tns:CreateDataCli
 <wsdl:output message="tns:CreateDataCli
 </wsdl:operation>
 </wsdl:portType>
- <wsdl:binding name="DataServiceSoap" type="tns:DataServiceSoap"
 <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="Hello">
 <soap:operation soapAction="http://webservices.xyz12307.com/Hello" style="document" />
- <wsdl:input>
 <soap:body use="literal" />
 </wsdl:input>
- <wsdl:output>
 <soap:body use="literal" />
 </wsdl:output>
 </wsdl:operation>
- <wsdl:operation name="EventLogTest">
 <soap:operation soapAction="http://webservices.xyz12307.com/EventLogTest" style="document" />
- <wsdl:input>
 <soap:body use="literal" />
 </wsdl:input>
- <wsdl:output>
 <soap:body use="literal" />
 </wsdl:output>
 </wsdl:operation>
- <wsdl:operation name="CreateObj">
 <soap:operation soapAction="http://webservices.xyz12307.com/CreateObj" style="document" />
- <wsdl:input>
 <soap:body use="literal" />
 </wsdl:input>
- <wsdl:output>
 <soap:body use="literal" />
 </wsdl:output>
 </wsdl:operation>
- <wsdl:operation name="CreateDataClient">
 <soap:operation soapAction="http://webservices.xyz12307.com/CreateDataClient" style="document" />
- <wsdl:input>
 <soap:body use="literal" />
 </wsdl:input>
- <wsdl:output>
 <soap:body use="literal" />
 </wsdl:output>
 </wsdl:operation>
 </wsdl:binding>
- <wsdl:binding name="DataServiceSoap12" type="tns:DataServiceSoap"
 <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="Hello">
 <soap12:operation soapAction="http://webservices.xyz12307.com/Hello" style="document" />
- <wsdl:input>
 <soap12:body use="literal" />
 </wsdl:input>
- <wsdl:output>
 <soap12:body use="literal" />
 </wsdl:output>
 </wsdl:operation>
- <wsdl:operation name="EventLogTest">
 <soap12:operation soapAction="http://webservices.xyz12307.com/EventLogTest" style="document" />
- <wsdl:input>
 <soap12:body use="literal" />
 </wsdl:input>
- <wsdl:output>
 <soap12:body use="literal" />
 </wsdl:output>
 </wsdl:operation>
- <wsdl:operation name="CreateObj">
 <soap12:operation soapAction="http://webservices.xyz12307.com/CreateObj" style="document" />
- <wsdl:input>
 <soap12:body use="literal" />
 </wsdl:input>
- <wsdl:output>
 <soap12:body use="literal" />
 </wsdl:output>
 </wsdl:operation>
- <wsdl:operation name="CreateDataClient">
 <soap12:operation soapAction="http://webservices.xyz12307.com/CreateDataClient" style="document" />
- <wsdl:input>
 <soap12:body use="literal" />
 </wsdl:input>
- <wsdl:output>
 <soap12:body use="literal" />
 </wsdl:output>
 </wsdl:operation>
 </wsdl:binding>
- <wsdl:service name="DataService">
- <wsdl:port name="DataServiceSoap" binding="tns:DataServiceSo
 <soap:address location="https://mdmcsxdev3.mdmc.com:448/DATAWebService/DataService.asmx" />
 </wsdl:port>
- <wsdl:port name="DataServiceSoap12" binding="tns:DataServiceSo
 <soap12:address location="https://mdmcsxdev3.mdmc.com:448/DATAWebService/DataService.asmx" />
 </wsdl:port>
 </wsdl:service>
 </wsdl:definitions>
Value cannot be null.
Parameter name: s
Refering to my xmlDeals string parameter...






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
All is well now! I really appreciate your help- you definately guided me in the right direction.
-oddic
Hope this helps someone with this same issue!

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
every <Â in a CDATA section will not be interpreted as the start of a tag (making the parameter no longer a string) but as a "<"Â sign in text
this way you made a string from the nested XML
"are you sure you are passing a string?" would have been my next question
.NET Programming
--
Questions
--
Followers
Top Experts
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.