Profil von Bob NovasBob Novas's WebLogFotosBlogListenMehr Extras Hilfe

Blog


    16 April

    Debugging Applications that use Groove Web Services by reading the Web Service SOAP conversation

    When you are developing an application that uses Groove Web Services to write records to a Groove Forms Tool (e.g., Forms2Tool), you sometimes run into an exception "The remote server returned an error: (500) Internal Server Error", with a null inner exception. You need more information to debug this problem. The best way I've found is to use a TCP trace utility and look at the SOAP conversation. This blog walks through an example.

    First of all, the trace utility I often use is tcptrace. This utility is simple to use, but requires a little bit of setup to work with GrooveWebServicesV12Helpers (GWSHelpers), which I use for most of my Groove applications. Tcptrace needs to be put "in-line", between Groove and the application that consumes Groove Web Services (GWS). The way to do that depends on whether you're using a Groove client or a Groove Data Bridge (GDB).

    It's simple if you're using a GDB. Set the application's Host argument passed to the Context object to a port like 9081, so that the application makes GWS calls to port 9081. Then use tcptrace to map 9081 to 9080 (the port where the GDB listens by default), and you're done. The application makes GWS calls (and receives responses) on 9081 to tcptrace. Tcptrace logs both directions of the SOAP conversation and passes the calls to the GDB on 9080 and the responses to the application listening on 9081.

    If you're using Groove client, it's a bit trickier. Regardless of the port the caller passes to the Context object, if the RequestKey parameter passed to the Context object is null, GWSHelpers will set the port based on the value of $HKCU\Software\Microsoft\Office\12.0\Groove\GrooveHTTPDesiredPort, which will be 9080 by default. So even if you pass 9081 to the Context object (e.g., by passing http://localhost:9081 as the host parameter), the GWSHelpers will use 9080. The workaround is to change the value of $HKCU\Software\Microsoft\Office\12.0\Groove\GrooveHTTPDesiredPort to 9081 and then run your application – GWSHelpers will then use 9081. If you restart Groove with $HKCU\Software\Microsoft\Office\12.0\Groove\GrooveHTTPDesiredPort set to 9081, Groove will use 9081, and you don't want this – so make sure Groove is running before you change the value.

    Now make your web service call and watch what tcptrace reports.

    Now you find that this command (not all of the command is shown):

    HTTP/1.1

    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.1434)

    VsDebuggerCausalityData: uIDPozkWzpT+NWpAojz7KKDMYYgAAAAAicJW37gpvEWxefjLoIaUhbSdimHZlKdJvTmKfVC3LmQACQAA

    Content-Type: text/xml; charset=utf-8

    SOAPAction: "http://www.groove.net/Groove/2.0/Forms2#CreateRecords"

    Host: localhost:9081

    Content-Length: 12102

    Expect: 100-continue

    <?xml version="1.0" encoding="utf-8"?><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"><soap:Header><GrooveRequestHeader xmlns="http://webservices.groove.net/Groove/2.0/Core/"><TimeToLive>0</TimeToLive>

    <GrooveIdentityURL>grooveIdentity://d5whz9tszbqz7pz4rkqiuaeugvw4vyxr@</GrooveIdentityURL>

    Yields the response:

    HTTP/1.1 500 Server error

    Content-Type: text/xml; charset=utf-8

    Connection: close

    Content-Length: 1063

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><GrooveResponseHeader xmlns="http://webservices.groove.net/Groove/2.0/Core/"><GrooveResponseKey>z2f3kgsf7fvn2784zv7tgc9ydxdrxujiqb2wzcs</GrooveResponseKey></GrooveResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Unable to set the 'ShapeTitle' field due to validation constraints.</faultstring><detail><GrooveError><Result>-2147155457</Result><Message>Unable to set the 'ShapeTitle' field due to validation constraints.</Message><ErrorInfo><Description>Unable to set the 'ShapeTitle' field due to validation constraints.</Description><GUID>{1623F60F-8955-44FE-875B-DC5CCF0DDA75}</GUID><Source>GWS</Source><FailureCode>0</FailureCode><Result>-2147155457</Result></ErrorInfo></GrooveError></detail></soap:Fault></soap:Body></soap:Envelope>

    As you can see above, the message "Unable to set the 'ShapeTitle' field due to validation constraints.", which unfortunately doesn't make it to the exception reported by the application, provides the clue to what's wrong. Further investigation reveals that the ShapeTitle field has a minimum length constraint that the application is violating.

    It's often helpful to look at the SOAP conversation when debugging a GWS problem – you can often see what's wrong more easily in the messaging than in the code.

    Kommentare (10)

    Bitte warten...
    Der eingegebene Kommentar ist zu lang. Bitte kürzen Sie ihn.
    Sie haben keine Angabe gemacht. Bitte versuchen Sie es erneut.
    Ihr Kommentar kann im Moment leider nicht hinzugefügt werden. Bitte versuchen Sie es später erneut.
    Zum Hinzufügen eines Kommentars ist die Erlaubnis von einem Elternteil erforderlich. Erlaubnis einholen
    Der Elternteil hat die Kommentarfunktion deaktiviert.
    Ihr Kommentar kann im Moment leider nicht gelöscht werden. Bitte versuchen Sie es später erneut.
    Sie haben die maximale Anzahl an Kommentaren, die pro Tag zugelassen sind, überschritten. Versuchen Sie es in 24 Stunden erneut.
    Kommentare wurden in Ihrem Konto deaktiviert, da in unseren Systemen angegeben wird, dass Sie anderen Benutzern möglicherweise unerwünschte E-Mails versenden. Wenn Sie der Meinung sind, dass es sich beim Deaktivieren Ihres Kontos um einen Fehler handelt, wenden Sie sich an Windows Live Support.
    Schließen Sie die Sicherheitsüberprüfung unten ab, damit Sie ein Kommentar hinterlassen können.
    Die bei der Sicherheitsüberprüfung eingegebenen Zeichen müssen den Zeichen im Bild oder in der Audiodatei entsprechen.

    Melden Sie sich zum Hinzufügen eines Kommentars mit Ihrer Windows Live ID an (wenn Sie Hotmail, Messenger oder Xbox LIVE verwenden, besitzen Sie eine Windows Live ID). Anmelden


    Sie haben noch keine Windows Live ID? Registrieren

    Bild von Anonym
    2 Dez.
    Bild von Anonym
    2 Dez.
    29 Okt.
    27 Okt.
    26 Okt.
    23 Okt.
    Kein Nameschrieb:

    Hi,Do you need advertising displays, advertisement screens, LCD digital signage and LCD signages? Please go Here:www.amberdigital.com.hk(Amberdigital).we have explored and developed the international market with professionalism. We have built a widespread marketing network, and set up a capable management team dedicated to provide beyond-expectation services to our customers.

    amberdigital Contact Us

    website:www.amberdigital.com.hk
    alibaba:amberdigital.en.alibaba.com[cjgdaabbejdgdh]

    15 Okt.
    Bild von Anonym
    arkansas private schools schrieb:
    private schools in delaware. kan private schools database in America private schools in delaware. kanLooking for a private school around your area? This site lists all US private schools and lets you compare vital data. Makes it easy to s us private schools Looking for a private school around your area? This site lists all US private schools and lets you compare vital data. Makes it easy to sprivate schools in Ameri florida private schools private schools in Amerigeorgia private schools. us private schools listing. find alabama private schools georgia private schools. us private schools listing. findAmerican private school compariso compare montana private schools American private school compariso
    22 Sept.
    Kein Nameschrieb:

    Hi,Do you need advertising displays, digital signages, ad players, advertisement player and LCD advertisings? Please go Here:www.amberdigital.com.hk(Amberdigital).we have explored and developed the international market with professionalism. We have built a widespread marketing network, and set up a capable management team dedicated to provide beyond-expectation services to our customers. amberdigital Contact Us

    website:www.amberdigital.com.hk
    alibaba:amberdigital.en.alibaba.com[jcegjjcbfcfaib]

    22 Sept.
    Kein Nameschrieb:
    Wan Moshou game, to (wow power leveling) site to buy the cheapest gold coins! To (wow gold) for the best Dailian upgrade!
    13 Sept.

    Trackbacks

    Die Trackback-URL für diesen Eintrag ist:
    http://bobnovas.spaces.live.com/blog/cns!30AB2D2627148CB8!167.trak
    Weblogs, die sich auf diesen Eintrag beziehen
    • Keine