I'm getting an error when creating a service appointment entity through the SOAP webservice about a mismatch between statuscode and statecode:
4 is not a valid status code for state code
ServiceAppointmentState.Open on serviceappointment.
Essentially saying that reserved (statuscode 4) isn't a member of the Open state (statecode 1). Which is true, it's actually a member of the Scheduled state (statecode 3) but in my request I'm correctly setting statecode to 3!
Does anyone know why my setting the serviceappointment to the Scheduled state is being ignored?
full request:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Create xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<entity xmlns:a="http://schemas.microsoft.com/xrm/2011/Contracts">
<a:Attributes xmlns:b="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<a:KeyValuePairOfstringanyType>
<b:key>statecode</b:key>
<b:value i:type="a:OptionSetValue">
<a:Value>3</a:Value>
</b:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<b:key>serviceid</b:key>
<b:value i:type="a:EntityReference">
<a:Id>c5b8179c-3cab-e211-ab0a-00155d1438e9</a:Id>
<a:LogicalName>service</a:LogicalName>
<a:Name i:nil="true" />
</b:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<b:key>scheduledend</b:key>
<b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:dateTime">2013-06-13T14:30:00</b:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<b:key>statuscode</b:key>
<b:value i:type="a:OptionSetValue">
<a:Value>4</a:Value>
</b:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<b:key>subject</b:key>
<b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:string">Support handover</b:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<b:key>scheduledstart</b:key>
<b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:dateTime">2013-06-13T09:00:00</b:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<b:key>py3_workpackageid</b:key>
<b:value i:type="a:EntityReference">
<a:Id>dc7008cf-2eab-e211-ab0a-00155d1438e9</a:Id>
<a:LogicalName>py3_workpackage</a:LogicalName>
<a:Name i:nil="true" />
</b:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<b:key>customers</b:key>
<b:value i:type="a:EntityCollection">
<a:Entities>
<a:Entity>
<a:Attributes>
<a:KeyValuePairOfstringanyType>
<b:key>partyid</b:key>
<b:value i:type="a:EntityReference">
<a:Id>050d25a8-03c9-e211-866e-00155d143602</a:Id>
<a:LogicalName>account</a:LogicalName>
<a:Name i:nil="true" />
</b:value>
</a:KeyValuePairOfstringanyType>
</a:Attributes>
<a:EntityState i:nil="true" />
<a:FormattedValues />
<a:Id>00000000-0000-0000-0000-000000000000</a:Id>
<a:LogicalName>activityparty</a:LogicalName>
<a:RelatedEntities />
</a:Entity>
</a:Entities>
<a:EntityName i:nil="true" />
<a:MinActiveRowVersion i:nil="true" />
<a:MoreRecords>false</a:MoreRecords>
<a:PagingCookie i:nil="true" />
<a:TotalRecordCount>0</a:TotalRecordCount>
<a:TotalRecordCountLimitExceeded>false</a:TotalRecordCountLimitExceeded>
</b:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<b:key>resources</b:key>
<b:value i:type="a:EntityCollection">
<a:Entities>
<a:Entity>
<a:Attributes>
<a:KeyValuePairOfstringanyType>
<b:key>partyid</b:key>
<b:value i:type="a:EntityReference">
<a:Id>3e17fce0-e9cd-e211-866e-00155d143602</a:Id>
<a:LogicalName>systemuser</a:LogicalName>
<a:Name i:nil="true" />
</b:value>
</a:KeyValuePairOfstringanyType>
</a:Attributes>
<a:EntityState i:nil="true" />
<a:FormattedValues />
<a:Id>00000000-0000-0000-0000-000000000000</a:Id>
<a:LogicalName>activityparty</a:LogicalName>
<a:RelatedEntities />
</a:Entity>
</a:Entities>
<a:EntityName i:nil="true" />
<a:MinActiveRowVersion i:nil="true" />
<a:MoreRecords>false</a:MoreRecords>
<a:PagingCookie i:nil="true" />
<a:TotalRecordCount>0</a:TotalRecordCount>
<a:TotalRecordCountLimitExceeded>false</a:TotalRecordCountLimitExceeded>
</b:value>
</a:KeyValuePairOfstringanyType>
</a:Attributes>
<a:EntityState i:nil="true" />
<a:FormattedValues xmlns:b="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<a:Id>00000000-0000-0000-0000-000000000000</a:Id>
<a:LogicalName>serviceappointment</a:LogicalName>
<a:RelatedEntities xmlns:b="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
</entity>
</Create>
</soap:Body>
</soap:Envelope>
it appears the same error occasionally happens when deleting solutions from an organisation so I've had trouble researching the issue. All I've found is this forum post, but it doesn't seem to be resolved.
statecode is a readonly property, you can't set its value when you create a new record.
To set the right value you need to use always a SetStateRequest
http://msdn.microsoft.com/en-us/library/microsoft.crm.sdk.messages.setstaterequest.aspx
Conclusion: first you need to create the record (and it will be in open state) and after change its status to reserved.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 days ago.
This post was edited and submitted for review 3 days ago.
Improve this question
NUnit testing produces a Results XML file that I would like to be able to create reports using Power Query with Power BI. I am really new to Power Query, and am really struggling with how to produce meaningful results. Namely, I would like to start with a report that shows all the tests with their respective pass/fail results for each test method that was run. I know how to do this with XPath, but I don't know if that is the Power Query way. I've search Google for some examples of this, but so far have found nothing helpful.
I have included a sample of NUnit V3 XML output. I basically want to transform all of the test-case elements as rows using Power Query within Power BI.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<test-run id="2" name="mock-assembly.dll" fullname="D:\Dev\NUnit\nunit-3.0\work\bin\vs2008\Debug\mock-assembly.dll" testcasecount="25" result="Failed" time="0.154" total="18" passed="12" failed="2" inconclusive="1" skipped="3" asserts="2" run-date="2011-07-26" start-time="11:34:27">
<environment nunit-version="1.0.0.0" clr-version="2.0.50727.4961" os-version="Microsoft Windows NT 6.1.7600.0" platform="Win32NT" cwd="D:\Dev\NUnit\nunit-3.0\work\bin\vs2008\Debug" machine-name="CHARLIE-LAPTOP" user="charlie" user-domain="charlie-laptop" culture="en-US" uiculture="en-US" />
<test-suite type="Assembly" id="1036" name="mock-assembly.dll" fullname="D:\Dev\NUnit\nunit-3.0\work\bin\vs2008\Debug\mock-assembly.dll" testcasecount="25" result="Failed" time="0.154" total="18" passed="12" failed="2" inconclusive="1" skipped="3" asserts="2">
<properties>
<property name="_PID" value="11928" />
<property name="_APPDOMAIN" value="test-domain-mock-assembly.dll" />
</properties>
<failure>
<message><![CDATA[Child test failed]]></message>
</failure>
<test-suite type="TestFixture" id="1000" name="MockTestFixture" fullname="NUnit.Tests.Assemblies.MockTestFixture" testcasecount="11" result="Failed" time="0.119" total="10" passed="4" failed="2" inconclusive="1" skipped="3" asserts="0">
<properties>
<property name="Category" value="FixtureCategory" />
<property name="Description" value="Fake Test Fixture" />
</properties>
<failure>
<message><![CDATA[Child test failed]]></message>
</failure>
<test-case id="1005" name="FailingTest" fullname="NUnit.Tests.Assemblies.MockTestFixture.FailingTest" result="Failed" time="0.023" asserts="0">
<failure>
<message><![CDATA[Intentional failure]]></message>
<stack-trace><![CDATA[ at NUnit.Framework.Assert.Fail(String message, Object[] args) in D:\Dev\NUnit\nunit-3.0\work\NUnitFramework\src\framework\Assert.cs:line 142
at NUnit.Framework.Assert.Fail(String message) in D:\Dev\NUnit\nunit-3.0\work\NUnitFramework\src\framework\Assert.cs:line 152
at NUnit.Tests.Assemblies.MockTestFixture.FailingTest() in D:\Dev\NUnit\nunit-3.0\work\NUnitFramework\src\mock-assembly\MockAssembly.cs:line 121]]></stack-trace>
</failure>
</test-case>
<test-case id="1010" name="InconclusiveTest" fullname="NUnit.Tests.Assemblies.MockTestFixture.InconclusiveTest" result="Inconclusive" time="0.001" asserts="0" />
<test-case id="1001" name="MockTest1" fullname="NUnit.Tests.Assemblies.MockTestFixture.MockTest1" result="Passed" time="0.000" asserts="0">
<properties>
<property name="Description" value="Mock Test #1" />
</properties>
</test-case>
<test-case id="1002" name="MockTest2" fullname="NUnit.Tests.Assemblies.MockTestFixture.MockTest2" result="Passed" time="0.000" asserts="0">
<properties>
<property name="Severity" value="Critical" />
<property name="Description" value="This is a really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really long description" />
<property name="Category" value="MockCategory" />
</properties>
</test-case>
<test-case id="1003" name="MockTest3" fullname="NUnit.Tests.Assemblies.MockTestFixture.MockTest3" result="Passed" time="0.000" asserts="0">
<properties>
<property name="Category" value="AnotherCategory" />
<property name="Category" value="MockCategory" />
</properties>
</test-case>
<test-case id="1007" name="MockTest4" fullname="NUnit.Tests.Assemblies.MockTestFixture.MockTest4" result="Skipped" label="Ignored" time="0.000" asserts="0">
<properties>
<property name="Category" value="Foo" />
<property name="_SKIPREASON" value="ignoring this test method for now" />
</properties>
<reason>
<message><![CDATA[ignoring this test method for now]]></message>
</reason>
</test-case>
<test-case id="1004" name="MockTest5" fullname="NUnit.Tests.Assemblies.MockTestFixture.MockTest5" result="Skipped" label="Invalid" time="0.000" asserts="0">
<properties>
<property name="_SKIPREASON" value="Method is not public" />
</properties>
<reason>
<message><![CDATA[Method is not public]]></message>
</reason>
</test-case>
<test-case id="1009" name="NotRunnableTest" fullname="NUnit.Tests.Assemblies.MockTestFixture.NotRunnableTest" result="Skipped" label="Invalid" time="0.000" asserts="0">
<properties>
<property name="_SKIPREASON" value="No arguments were provided" />
</properties>
<reason>
<message><![CDATA[No arguments were provided]]></message>
</reason>
</test-case>
<test-case id="1011" name="TestWithException" fullname="NUnit.Tests.Assemblies.MockTestFixture.TestWithException" result="Failed" label="Error" time="0.002" asserts="0">
<failure>
<message><![CDATA[System.ApplicationException : Intentional Exception]]></message>
<stack-trace><![CDATA[ at NUnit.Tests.Assemblies.MockTestFixture.MethodThrowsException() in D:\Dev\NUnit\nunit-3.0\work\NUnitFramework\src\mock-assembly\MockAssembly.cs:line 158
at NUnit.Tests.Assemblies.MockTestFixture.TestWithException() in D:\Dev\NUnit\nunit-3.0\work\NUnitFramework\src\mock-assembly\MockAssembly.cs:line 153]]></stack-trace>
</failure>
</test-case>
<test-case id="1006" name="TestWithManyProperties" fullname="NUnit.Tests.Assemblies.MockTestFixture.TestWithManyProperties" result="Passed" time="0.000" asserts="0">
<properties>
<property name="TargetMethod" value="SomeClassName" />
<property name="Size" value="5" />
</properties>
</test-case>
</test-suite>
<test-suite type="TestFixture" id="1023" name="BadFixture" fullname="NUnit.Tests.BadFixture" testcasecount="1" result="Skipped" label="Invalid" time="0.000" total="0" passed="0" failed="0" inconclusive="0" skipped="0" asserts="0">
<properties>
<property name="_SKIPREASON" value="No suitable constructor was found" />
</properties>
<reason>
<message><![CDATA[No suitable constructor was found]]></message>
</reason>
</test-suite>
<test-suite type="TestFixture" id="1025" name="FixtureWithTestCases" fullname="NUnit.Tests.FixtureWithTestCases" testcasecount="2" result="Passed" time="0.010" total="2" passed="2" failed="0" inconclusive="0" skipped="0" asserts="2">
<test-suite type="ParameterizedMethod" id="1026" name="MethodWithParameters" fullname="NUnit.Tests.FixtureWithTestCases.MethodWithParameters" testcasecount="2" result="Passed" time="0.009" total="2" passed="2" failed="0" inconclusive="0" skipped="0" asserts="2">
<test-case id="1027" name="MethodWithParameters(2,2)" fullname="NUnit.Tests.FixtureWithTestCases.MethodWithParameters(2,2)" result="Passed" time="0.006" asserts="1" />
<test-case id="1028" name="MethodWithParameters(9,11)" fullname="NUnit.Tests.FixtureWithTestCases.MethodWithParameters(9,11)" result="Passed" time="0.000" asserts="1" />
</test-suite>
</test-suite>
<test-suite type="TestFixture" id="1016" name="IgnoredFixture" fullname="NUnit.Tests.IgnoredFixture" testcasecount="3" result="Skipped" label="Ignored" time="0.000" total="0" passed="0" failed="0" inconclusive="0" skipped="0" asserts="0">
<properties>
<property name="_SKIPREASON" value="" />
</properties>
<reason>
<message><![CDATA[]]></message>
</reason>
</test-suite>
<test-suite type="ParameterizedFixture" id="1029" name="ParameterizedFixture" fullname="NUnit.Tests.ParameterizedFixture" testcasecount="4" result="Passed" time="0.007" total="4" passed="4" failed="0" inconclusive="0" skipped="0" asserts="0">
<test-suite type="TestFixture" id="1030" name="ParameterizedFixture(42)" fullname="NUnit.Tests.ParameterizedFixture(42)" testcasecount="2" result="Passed" time="0.003" total="2" passed="2" failed="0" inconclusive="0" skipped="0" asserts="0">
<test-case id="1031" name="Test1" fullname="NUnit.Tests.ParameterizedFixture(42).Test1" result="Passed" time="0.000" asserts="0" />
<test-case id="1032" name="Test2" fullname="NUnit.Tests.ParameterizedFixture(42).Test2" result="Passed" time="0.000" asserts="0" />
</test-suite>
<test-suite type="TestFixture" id="1033" name="ParameterizedFixture(5)" fullname="NUnit.Tests.ParameterizedFixture(5)" testcasecount="2" result="Passed" time="0.002" total="2" passed="2" failed="0" inconclusive="0" skipped="0" asserts="0">
<test-case id="1034" name="Test1" fullname="NUnit.Tests.ParameterizedFixture(5).Test1" result="Passed" time="0.000" asserts="0" />
<test-case id="1035" name="Test2" fullname="NUnit.Tests.ParameterizedFixture(5).Test2" result="Passed" time="0.000" asserts="0" />
</test-suite>
</test-suite>
<test-suite type="TestFixture" id="1012" name="OneTestCase" fullname="NUnit.Tests.Singletons.OneTestCase" testcasecount="1" result="Passed" time="0.001" total="1" passed="1" failed="0" inconclusive="0" skipped="0" asserts="0">
<test-case id="1013" name="TestCase" fullname="NUnit.Tests.Singletons.OneTestCase.TestCase" result="Passed" time="0.000" asserts="0" />
</test-suite>
<test-suite type="TestFixture" id="1014" name="MockTestFixture" fullname="NUnit.Tests.TestAssembly.MockTestFixture" testcasecount="1" result="Passed" time="0.001" total="1" passed="1" failed="0" inconclusive="0" skipped="0" asserts="0">
<test-case id="1015" name="MyTest" fullname="NUnit.Tests.TestAssembly.MockTestFixture.MyTest" result="Passed" time="0.001" asserts="0" />
</test-suite>
</test-suite>
</test-run>
I'm totally desperate. I've been trying to install Nuget.Server v3.2.1.0 for two days now.
I followed the installation instructions at https://learn.microsoft.com/de-de/nuget/hosting-packages/nuget-server, but it doesn't work.
I suspect that the routing doesn't work properly.
My Web.config looks like:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<compilation strict="false" explicit="true" debug="true" targetFramework="4.6" />
<!-- maxRequestLength is specified in Kb -->
<httpRuntime targetFramework="4.6" maxRequestLength="30720" />
</system.web>
<appSettings>
<add key="aspnet:UseHostHeaderForRequestUrl" value="true" />
<add key="requireApiKey" value="true" />
<add key="apiKey" value="MyApiKey" />
<add key="packagesPath" value="D:\TFS-Workspaces\Fachit360\Playground\NuGet Server\NuGet Server\Packages" />
<add key="cacheFileName" value="" />
<add key="allowOverrideExistingPackageOnPush" value="false" />
<add key="ignoreSymbolsPackages" value="true" />
<add key="enableDelisting" value="false" />
<add key="enableFrameworkFiltering" value="false" />
<add key="enableFileSystemMonitoring" value="true" />
<add key="allowRemoteCacheManagement" value="false" />
<add key="initialCacheRebuildAfterSeconds" value="15" />
<add key="cacheRebuildFrequencyInMinutes" value="60" />
</appSettings>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
</compilers>
</system.codedom>
<system.webServer>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
<remove name="WebDAV" />
</handlers>
<staticContent>
<remove fileExtension=".nupkg"/>
<mimeMap fileExtension=".nupkg" mimeType="application/zip" />
</staticContent>
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
</modules>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="31457280" />
</requestFiltering>
</security>
</system.webServer>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
...
</assemblyBinding>
</runtime>
</configuration>
And here is my development environment:
- Visual Studio 2017 Pro (15.9.12)
- Windows 10 Enterprise LTSC
- IIS Express 10.0 (Visual Studio integrated)
The installation is very simple. The overview page is also displayed:
What I find confusing is that the Default.aspx file contains the following:
Click here to view your packages.
And in the file NuGetODataConfig.cs the following is configured:
NuGetV2WebApiEnabler.UseNuGetV2WebApiFeed(
config,
"NuGetDefault,
"nuget"
"PackagesOData,
enableLegacyPushRoute: true);
Anyway, when I click on "Click here to view your packages", I get the error: "Page not found - 404".
Does anyone have an idea why that might be? I am at the end of my Latin.
Many greetings
Update
I forgot to mention that I also tried to release the project on a Windows Server 2012 R2. Exactly the same problem.
And it's strange that you can find the following packages in my project references:
- Nuget.Core
- Nuget.server
- Nuget.Server.Core
- Nuget.Server.V2
Then why does the start page talk about Nuget.Server 3.2.1.0?
I developed a RESTFul service but I am having problems when I want to pass a parameter that has a dot in it. I tried encoding the URL, replacing the dot by %2E, but the end point is not found. When I remove the dot, the end point is found, so it is obvious that something is wrong with the dot.
for example, this request works:
http://localhost:9999/SvcLipigas.svc/AlmacenaPedido/229188562/16122016/2030/123456/CILINDRO%2015%20KGCODIGAS/2/14000/15/19122016/1514/19122016/1000
But this other one does not:
http://localhost:9999/SvcLipigas.svc/AlmacenaPedido/229188562/16122016/2030/123456/CILINDRO%2015%20KG%2ECODIGAS/2/14000/15/19122016/1514/19122016/1000
Notice the dot in the "CILINDRO%2015%20KG%2ECODIGAS" parameter.
Any help will be appreciated.
Currently, as a patch, I am sending the dot replaced by a pipe character, and in the service, I am replacing it back to the dot, but this is a very ugly solution.
EDIT:
[OperationContract]
[WebInvoke(Method = "GET",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped,
UriTemplate = "AlmacenaPedido/{telefono}/{fechaPedido}/{horaPedido}/{codigoInterno}/{descripcionProducto}/{cantidadProducto}/{valorUnitario}/{kilosProducto}/{fechaEntrega}/{horaEntrega}/{fechaDespacho}/{horaDespacho}")]
int AlmacenaPedido(string telefono, string fechaPedido, string horaPedido, string codigoInterno, string descripcionProducto,
string cantidadProducto, string valorUnitario, string kilosProducto, string fechaEntrega, string horaEntrega,
string fechaDespacho, string horaDespacho);
EDIT: This is the full web.config file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="WS_PedidoCliente.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" relaxedUrlToFileSystemMapping="true" />
</system.web>
<system.serviceModel>
<services>
<service name="WS_PedidoCliente.SvcLipigas" behaviorConfiguration="serviceBehavior">
<endpoint address=""
binding="webHttpBinding"
contract="WS_PedidoCliente.ISvcLipigas"
bindingNamespace="http://ws.lipigas.cl"
behaviorConfiguration="web"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehavior">
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<protocolMapping>
<add scheme="http" binding="webHttpBinding"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true" />
</system.webServer>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v12.0" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
<connectionStrings>
<add name="LipigasEntities" connectionString="metadata=res://*/Model.Lipigas.csdl|res://*/Model.Lipigas.ssdl|res://*/Model.Lipigas.msl;provider=Oracle.DataAccess.Client;provider connection string="DATA SOURCE=SLLCOSTO;PASSWORD=uni_1915sll;USER ID=PEDIDO"" providerName="System.Data.EntityClient" />
</connectionStrings>
<applicationSettings>
<WS_PedidoCliente.Properties.Settings>
<setting name="Usuario" serializeAs="String">
<value>EMDITEC</value>
</setting>
</WS_PedidoCliente.Properties.Settings>
</applicationSettings>
</configuration>
This is a limitation of IIS.
It is treating the dot (encoded or not) as an extension.
Try adding
<httpRuntime relaxedUrlToFileSystemMapping="true" />
to the web.config
I created a WCF service and hosted it on my IIS server. Then, I needed to edit the schemaLocation. I followed this post.
When I add "?wsdl" to the url, I get an empty page. If I try to use the WSDL from SOAPui to test it, I get this "Error loading [http://xx.xxx.xx.xx:8095/CardServiceLib.CardService.svc/service?wsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected end of file after nul"
If I delete the HTTPGetUrl, the WSDL is correct but the schemaLocation isn't what I want. With the mod I made with the linked post, the schemaLocation is perfect but the WSDL is empty... why?
This works, but not as I want (generates WSDL but with wrong links):
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />
and this not (doesn't generate WSDL --> blank page!!!):
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" httpGetUrl="http://xx.xx.xx.xx.:8095/MyService.svc/endpoint"/>
This is my web.config on IIS server 7
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="connectionString" connectionString="server=xxxxx;database=xxxxx;uid=xxxxx;pwd=xxxxx;" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
<add key="userName" value="admin" />
<add key="password" value="xxxxx" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="SecurityKey" value="xxxxxxxxxx" />
</appSettings>
<system.web>
<compilation debug="true" />
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<!--<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>-->
</system.web>
<system.serviceModel>
<standardEndpoints>
<webHttpEndpoint>
<!-- the "" standard endpoint is used for auto creating a web endpoint. -->
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" />
</webHttpEndpoint>
</standardEndpoints>
<bindings>
<basicHttpBinding>
<binding name="SecurityByTransport" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
<readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" />
<!--<message clientCredentialType="UserName"/>-->
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="CardServiceLib.CardService" behaviorConfiguration="customBehavior">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecurityByTransport" name="base" contract="CardServiceLib.ICardService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" name="mex" contract="IMetadataExchange" />
<!--<endpoint address="web" behaviorConfiguration="webHttp" binding="webHttpBinding"
bindingConfiguration="" name="web" contract="calc.ICalcService">
<identity>
<dns value="localhost" />httpGetUrl="http://77.108.40.77:8095/CardServiceLib.CardService.svc/service"
</identity>
</endpoint>-->
<host>
<baseAddresses>
<add baseAddress="https://xx.xx.xx.xx:8095/MyService/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="webHttp">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
<behavior name="customBehavior">
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" httpGetUrl="http://xx.xx.xx.xx:8095/MyService.Service.svc/service"/>
<serviceDebug includeExceptionDetailInFaults="True" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="xx,xx" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<!--<protocolMapping>
<add binding="webHttpBinding" scheme="http" />
</protocolMapping>-->
</system.serviceModel>
<system.webServer>
<directoryBrowse enabled="false" />
</system.webServer>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup></configuration>
SOLVED!! I added this
address="http://192.168.1.2/Demo.Service/MultiEndPointsService.svc/basic"
in my endpoint tag, like written in this link.
I suspect the issue is related to the authentication required to access the WSDL.
When attempting to access the metadata URL directly, the web site indicates the following:
“Authentication Required”
“The server http://...:8095 requires a username and password.”
You either need to provide the proper credentials or relax the permissions on the WSDL.
I've got such definitions in my tiles.xml:
<definition name="t.base" template="/WEB-INF/tiles/base.jsp">
<put-attribute name="title" value="SomeTitle" />
<put-attribute name="menu" value="/WEB-INF/tiles/menu.jsp" />
<put-attribute name="scripts" value="/WEB-INF/tiles/scripts.jsp" />
</definition>
<definition name="t.homepage" extends="t.base" preparer="com.blogspot.symfonyworld.lyricsbase.controller.TestViewPreparer">
<put-list-attribute name="body">
<add-attribute value="/WEB-INF/jsp/homepage.jsp" />
<add-attribute value="/WEB-INF/tiles/footer.jsp" />
</put-list-attribute>
<put-attribute name="title" value="lyricsBase : home of lyrics" />
<put-attribute name="view" value="homepage" cascade="true" />
</definition>
The compiler throws me an exception when a request is handled for homepage:
org.xml.sax.SAXParseException; lineNumber: 29; columnNumber: 18; The content of element type "definition" must match "(put-attribute*,put-list-attribute*)".
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
I've got no idea what is wrong - the XML syntax seems to be correct according to the tiles docs.
The <put-list-attribute> element must be at the end of the definition, as follows:
<definition name="t.homepage" extends="t.base" preparer="com.blogspot.symfonyworld.lyricsbase.controller.TestViewPreparer">
<put-attribute name="title" value="lyricsBase : home of lyrics" />
<put-attribute name="view" value="homepage" cascade="true" />
<put-list-attribute name="body">
<add-attribute value="/WEB-INF/jsp/homepage.jsp" />
<add-attribute value="/WEB-INF/tiles/footer.jsp" />
</put-list-attribute>
</definition>