question

NunoCorreia-5574 avatar image
0 Votes"
NunoCorreia-5574 asked TimonYang-MSFT commented

There is an error in XML dcoument (1, 11) error

I have a problem in my project, I can consume a client in my C# project but when I invoke it it gives the error :

There is an error in XML document(1,112).
InnerException: The path is not a legal form.
Message: There is an error in XML document(1, 112). Source: System.

IDE: Visual Studio 2010

![131643-image.png][1]



My cclient automatic generated:

/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="http://facturasPasta.service.ga.ccf/", ResponseNamespace="http://facturasPasta.service.ga.ccf/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public facturasPastaResponse getFacturasPastaFE([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] long arg0, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] [System.Xml.Serialization.XmlIgnoreAttribute()] bool arg0Specified) {
object[] results = this.Invoke("getFacturasPastaFE", new object[] {
arg0,
arg0Specified});
return ((facturasPastaResponse)(results[0]));
}



dotnet-csharp
image.png (26.5 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@NunoCorreia-5574
Could you please provide sample xml?
I cannot reproduce your problem based on current information.

0 Votes 0 ·

If you debug the getFacturasPastaFE in your service can you see what you're returning to the client?

0 Votes 0 ·

1 Answer

NunoCorreia-5574 avatar image
0 Votes"
NunoCorreia-5574 answered TimonYang-MSFT commented

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">;
<S:Header>
<WorkContext xmlns="http://oracle.com/weblogic/soap/workarea/">rO0ABXdSAB13ZWJsb2dpYy5hcHAuQ0NGQ29uZmVyZW5jaWFXUwAAANYAAAAjd2VibG9naWMud29ya2FyZWEuU3RyaW5nV29ya0NvbnRleHQABFYyLjAAAA==</WorkContext>;
</S:Header>
<S:Body>
<ns2:PesquisaFacturaMCDTResponse xmlns:ns2="http://mcdt.service.cc.ccf/">
<return>
<codigoErro>0</codigoErro>
<facturaMCDT>
<area>M</area>
<codPrestador>201861112</codPrestador>
<dataFactura>2014-10-31T00:00:00Z</dataFactura>
<idFactura>479540</idFactura>
<nifAdquirente>503135593</nifAdquirente>
<nifPrestador>500883629</nifPrestador>
<numFactura>B-2014321</numFactura>
<numLotes>62</numLotes>
<numRequisicoes>1832</numRequisicoes>
<totalDesconto>0.0</totalDesconto>
<totalDomicilios>0.0</totalDomicilios>
<totalPrestacoes>41548.25</totalPrestacoes>
<totaltaxasModeradoras>2694.1</totaltaxasModeradoras>
</facturaMCDT>
</return>
</ns2:PesquisaFacturaMCDTResponse>
</S:Body>
</S:Envelope>

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@NunoCorreia-5574
The xml looks good, the problem should not come from the Xml structure.
I see InnerException: The path is not a legal form.
Where is the path-related classes and methods used in the related code in the service?

0 Votes 0 ·