SOAP Calls in Regeln

Stefan Lee

Guten Tag.



Für unseren Kunden suchen wir eine Lösung, um in der Rechnungsübersicht den Status der Rechnung per SOAP-Call zu überprüfen.

Ich hab ein Addon erstellt, welches diesen SOAP-Aufruf macht. Standalone funktioniert das Addon ohne Probleme. Binde ich es jedoch per SIP in SAP ein, dann ersteint folgende Meldung:



[quote]

Es wurde kein Endpunktelement mit dem Namen "whoisSoap" und dem Vertrag "whoisSoap" im ServiceModel-Clientkonfigurationsabschnitt gefunden. Dies kann folgende Ursachen haben: Für die Anwendung wurde keine Konfigurationsdatei gefunden, oder im Clientelement wurde kein Endpunktelement gefunden, das diesem Namen entsprach.

[/quote]



Kopieren der "app.config"-Datei nach "C:\Program Files\SAP\SAP Business One\AddOns\COR\coresuite" hat keine Verbesserung gebracht.



Wie kann ich die Infos aus meiner app.config-Datei in das Addon, SAP oder coresystems einbinden?



Vielen Dank für Ihre Hilfe und mit freundlichen Grüssen,

Stefan

Paolo Manfrin

Hi Stefan,

you should verify the path where the application tries to load the app.config.

You can use the DebugLog to trace the path.



If you don't use the app.config file in your application you can avoid to include it in the final solution?

In Visual Studio, could you change the app.config -> properties -> Build Action from "Content" to "None".



hth

paolo

Stefan Lee

[quote name='Paolo Manfrin' timestamp='1309951674' post='19444']

you should verify the path where the application tries to load the app.config.

You can use the DebugLog to trace the path.

[/quote]



There is no information in the DebugLog about the Path.

You find the snippet below:



<message level="2" date="06.07.2011" time="13:41:09">

<stacktrace>

<stackframe number="0" line="0" column="0">

<method>CSCode.Execute</method>

<file />

</stackframe>

<stackframe number="1" line="0" column="0">

<method>OptimizerEventHandler.HandleFormDataEvent</method>

<file />

</stackframe>

<stackframe number="2" line="0" column="0">

<method>OptimizerEventHandler.Application_FormDataEvent</method>

<file />

</stackframe>

<stackframe number="3" line="0" column="0">

<method>CustomizeEventHandler.Global_FormDataEvent</method>

<file />

</stackframe>

<stackframe number="4" line="0" column="0">

<method>FormDataEventHandler.Invoke</method>

<file />

</stackframe>

<stackframe number="5" line="0" column="0">

<method>Global.CatchFormDataEvent</method>

<file />

</stackframe>

</stacktrace>

<description>customize C# rule 00000014 runtime error: Es wurde kein Endpunktelement mit dem Namen "whoisSoap" und dem Vertrag "whoisSoap" im ServiceModel-Clientkonfigurationsabschnitt gefunden. Dies kann folgende Ursachen haben: Für die Anwendung wurde keine Konfigurationsdatei gefunden, oder im Clientelement wurde kein Endpunktelement gefunden, das diesem Namen entsprach.

(Inner)-Trace:

bei System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)

bei System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName, Configuration configuration)

bei System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName)

bei System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)

bei System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)

bei System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()

bei System.ServiceModel.EndpointTrait`1.CreateChannelFactory()

bei System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)

bei System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()

bei System.ServiceModel.ClientBase`1..ctor(String endpointConfigurationName)

bei whoisSoapClient..ctor(String endpointConfigurationName)

bei SIT_SOAPCLIENT.SIT_SoapClient.getDomain(CustomizeEvent pVal)

bei COR_Utility.Helper.Run_FO_COR_CUS_00000014(CustomizeEvent pVal)</description>

</message>



[quote name='Paolo Manfrin' timestamp='1309951674' post='19444']

If you don't use the app.config file in your application you can avoid to include it in the final solution?

In Visual Studio, could you change the app.config -> properties -> Build Action from "Content" to "None".

[/quote]



I added this .config file because it holds the soap-entrypoints and definitions which can't be found.



Best regards,

Stefan

Paolo Manfrin

Hi,

did you try then setting the property of app.config to copyAlways?

Is the app.config built in the same output directory of the main .dll or is it in a subfolder?

if it is in a subfolder then when you create the .sip you should copy the exact structure including subfolders.



Concerning the debugLog I mean that you shoudl write some output statement in order to understand where the app.config it is supposed to reside. This should be done before the exception get raised so you would be able to figure out where the file is expected to be.



hth

paolo

Stefan Lee

[quote name='Paolo Manfrin' timestamp='1309953645' post='19448']

did you try then setting the property of app.config to copyAlways?

[/quote]

yes, this option is selected.



[quote name='Paolo Manfrin' timestamp='1309953645' post='19448']

Is the app.config built in the same output directory of the main .dll or is it in a subfolder?

if it is in a subfolder then when you create the .sip you should copy the exact structure including subfolders.

[/quote]

It is in the same folder as the .dll

I have added it to the .sip as in den "bin"-folder.

In addition it is in the coresystems root-addon folder, where all sips and dlls are.



[quote name='Paolo Manfrin' timestamp='1309953645' post='19448']

Concerning the debugLog I mean that you shoudl write some output statement in order to understand where the app.config it is supposed to reside. This should be done before the exception get raised so you would be able to figure out where the file is expected to be.

[/quote]

Do you now the correct c# command to find the root-folder for such appliction definitions? or the command to change the standard path for the config-file?



best regards,

stefan
0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post