[ASP.NET] soap <Faultcode>

Pagina: 1
Acties:

  • Bats
  • Registratie: Oktober 2000
  • Laatst online: 30-01 19:14
Heb een kleine webservice gemaakt om een soap exception te testen.
als resultaat krijg ik dit:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Body>
<soap:Fault>
<faultcode xmlns:q0="http://www.vecozo.nl/cov/">q0:VECOZO101</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Problemen met zoek criteria
at WebService3.Service1.HelloWorld(String test) in c:\inetpub\wwwroot\WebService3\Service1.asmx.vb:line 64</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>


Nu is alles bijna zoals ik wil alleen moet er inplaats van
<faultcode xmlns:q0="http://www.vecozo.nl/cov/">q0:VECOZO101</faultcode>
dit komen
<faultcode xmlns:vc="http://www.vecozo.nl/cov/">vc:VECOZO101</faultcode>

Hoe kan ik dit zo krijgen en waar haalt hij die :q0 vandaan want die heb ik nergens
neergezet.


<WebMethod()> _
Public Function HelloWorld(ByVal test As String) As String
Dim exSoap As SoapException
Dim bats As XmlQualifiedName
Dim sstring As String

bats = New XmlQualifiedName("VECOZO101", "http://www.vecozo.nl/cov/")

sstring = "Problemen met zoek criteria"

exSoap = New SoapException(sstring, bats)

Throw exSoap

End Function